Skip to content

Connect to MySQL remotely

Shuang edited this page Aug 29, 2017 · 2 revisions

Error

ERROR 2003 (HY000): Can't connect to MySQL server on '10.118.44.4' (61)

Solution

Step1:

  1. open config file vim /etc/mysql/my.cnf
  2. comment bind-address = 127.0.0.1
  3. restart mysql service mysql restart

Step2:

mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;

[[TOC]]

Clone this wiki locally