Error connecting to remote database with Jdbc

Authorized user login:
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
the first root indicates the user name, % indicates that all computers can be connected, or a certain The ip address runs the connection and the second root means the password.

The flush privileges;
command takes effect immediately.


When using other mysql visualization tools to connect to the mysql database, the following situation occurs:

At this time, you need to log in to the server to set up your mysql and restart mysql as follows:
1. vim /etc/mysql/my.cnf
talks about bind in the configuration -address = 127.0.0.1
This item is changed to bind-address = 0.0.0.0
to cancel the MySQL Server binding local address!
Then save and exit (wq)

2.sudo /etc/init.d/mysql restart (restart mysql service)

This is done, you can try it, it has troubled yourself for more than an hour, so record it, I hope you can Help those who have the same problem

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326092157&siteId=291194637