Tag Archives: navicat

Solution to communication link failure with error in idea startup project

Problem description

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Solution

Option 1   Tomcat VM configuration parameters: – DJava. Net. Preferipv4stack = true

Option 2   ① Nginx configuring agent MySQL:

    ② Modify database connection: spring. Datasource. Url = JDBC: mysql://localhost:9999/demo?characterEncoding=utf8

Reference from:

https://blog.csdn.net/baidu_21349635/article/details/121032229
https://adong.blog.csdn.net/article/details/111501253

[Solved] MYSQL Error: unknown error 1130, unknown error 1045

When using Navicat to link mysql, the following error is reported:

Solution:

Log in to MySQL on the server and enter use MySQL:

root@localhost 09:07:  [mysql]> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.07 sec)
root@localhost 09:12:  [mysql]> flush privileges;
Query OK, 0 rows affected (0.02 sec)

Then, using the Navicat link again, the following appears:

Solution:

GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘yourpassword’ WITH GRANT OPTION

root@localhost 09:13:  [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.02 sec)

root@localhost 09:14:  [mysql]> flush privileges;
Query OK, 0 rows affected (0.02 sec)

To sum up: this kind of error is probably caused by the permissions set by the root user in MySQL in the database