remotely connect to MySQL on the server.
Navicat Software Connection Database error: 2003-can ' t connect to MYSQL serve
Tools/Materials
- CRT, Navicat, Linux system, MySQL.
Method/Step
Connect the Linux system remotely to ensure that the Linux system is installed on the MySQL database. Log in to the database. Mysql-uroot-p (password).
Create a user to connect remotely
GRANT all privileges on * * to ' itoffice ' @ ' percent ' identified by ' Itoffice ' with GRANT OPTION;
(The first itoffice represents the user name,% means that all computers can connect, you can set an IP address to run the connection, and the second itoffice represents a password).
Execute flush privileges; command takes effect immediately
The user who queried the database (see the following indicating that the creation of the new user succeeded)
SELECT DISTINCT CONCAT (' User: ', user, ' @ ', host, '; ') as query from Mysql.user;
Exit MySQL using the exit command
Then open vim/etc/mysql/my.cnf.
Will bind-address = 127.0.0.1
Set to Bind-address = 0.0.0.0 (device address)
Reboot (command below):
/etc/init.d/mysql stop
/etc/init.d/mysql start
View Port Numbers
Show global variables like ' port ';
Sets the Navicat connection.
Click Connect Test to see that the following indicates success.
Http://jingyan.baidu.com/article/363872ec3263236e4ba16f07.html
Linux system MySQL open remote connection