Under Linux open the Remote Access Mysql

How Window database visualization tool for remote connection Mysql Linux installed on it? Following these steps can confirm each!

Check whether there listening port

netstat -ntlp  |grep  mysql 

 

Check the Configuration Mysql

First execution: vim /etc/my.cnf

[mysqld] 
Port = 3306 
the bind -address = 0.0 . 0.0      # 0.5 into this line 0.0 . 0 or directly Zhushidiao 
Socket = / tmp / mysql.sock 
DATADIR = / usr / local / MySQL / var 
Skip -external-locking

 

Access to the database in turn execute the following command

  1. mysql -u root -p use mysql;
  2. . GRANT ALL PRIVILEGES ON * * TO 'root' @ '%' IDENTIFIED BY '123456'; # 123456 here to give you permission to add a password set by the user,% represents all hosts can also be specific to your host ip address
  3. flush privileges; # reload the privilege data
  4. select * from user; # check whether successful set

Guess you like

Origin www.cnblogs.com/poloyy/p/12169218.html