A 2013 error occurs when using local SSH connection, as shown below:
Use regular and SSH connection
Note: SSh connection is used to connect to the server, while the normal connection is used to connect to the MySQL database in the server (the user name and password of the SSH connection here are for the service (the default is root), and the normal connection is used to connect to the MySQL database in the server) The username and password are the username and password set by the MySQL installation).
Related recommendations: "Navicat for mysql graphic tutorial"
1. Connect to MySQL in the server
This The connection name is arbitrary, the IP is 127.0.0.1; the port is 3306, the username is root, and the password is the login password you entered when msql -u root -p; make sure the username and password are correct.
#2. Then click SSH
The IP here is the IP of the server. The default port is 22. The username and password are Username and password for remote connection to the server (default is root); make sure the username and password are correct and click Connection Test.
Note: If unsuccessful, please check your password, or comment out bind-address = in vim /etc/mysql/my.cnf in your MySQL configuration 127.0.0.1)
Finally, you can operate the database on the server locally!
The above is the detailed content of What should I do if navicat reports error 2013 when connecting to the database?. For more information, please follow other related articles on the PHP Chinese website!