Mysql报错:
出现Can’t connect to local MySQL server thrugh socket ‘/tmp/mysql.sock’(2)
解决方法:注释掉mysql配置文件的socket=/tmp/mysql.sock
主从数据库问题:
Slave_SQL_Running: No,解决方法:可以使用命令set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
注意:在配置主从数据库的时候要先初始化在修改配置文件,否则可能会报错(主从一起配置最好)
Mysql查看权限问题:
以管理员ROOT登录后,show grants for ‘user’@’IP‘; 或者 select user from mysql.user; 确认用户账号是否存在。
mysql> show grants for ‘test’@‘127.0.0.1’;
ERROR 1141 (42000): There is no such grant defined for user ‘test’ on host ‘127.0.0.1’
mysql>
返回信息:ERROR 1141 (42000): There is no such grant defined for user ‘test’ on host ‘127.0.0.1’
说明,没有jtsec用户,或者没有对jtsec用户进行在192.168.8.123远程访问的授权。
解决:
mysql> grant all privileges on . to ‘test’@‘127.0.0.1’ identified by ‘test’ with grant option;
mysql> flush privileges;
mysql> show grants for ‘test’@‘127.0.0.1’;
mysql> select user,host from mysql.user;
参考网址:https://www.cnblogs.com/linst/p/5874987.html