1、navicat连接mysql 用navicat连接mysql还是会报错: 原因是mysql8的加密方式规则不一样,是caching_sha2_password 把加密方式改成mysql_native_password就行了:
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '1234';
2、连接不成功就是你防火墙打开的,或者3306端口没打开 关闭防火墙,打开3306端口连接成功!!!
3、Communications link failure解决方法,延长MySQL的连接时间
mysql> show global variables like 'wait_timeout';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout | 28800 |
+---------------+-------+
1 row in set (0.01 sec)
mysql>
mysql> set global wait_timeout=604800;
Query OK, 0 rows affected (0.00 sec)
4、DBeaver连接MySQL报Public Key Retrieval is not allowed 错误的解决方法 打开连接设置->选择驱动属性->将allowPublicKeyRetrieval修改为TRUE。然后重新连接就可以了 4、远程连接mysql 提示 Access denied for user ‘root’@‘192.168.3.10’ (using password: YES) Access denied for user ‘root’@‘192.168.3.10’ (using password: YES)
是因为没有正确的开放mysql远程权限
CREATE USER 'root'@'%' IDENTIFIED BY 'root';
GRANT ALL ON *.* TO 'root'@'%';
|