\1146 - Table 'performance_schema.session_variables' doesn't exist

Mysql无法正常连接:

 

错误原因:Navicat Premium :\1146 - Table 'performance_schema.session_variables' doesn't exist

解决办法

[root@zookeeper1 usr]# mysql_upgrade -u root -p --force
Enter password:

 

 

 

错误原因:未设置远程连接:

grant all privileges on *.* to 'root'@'%'identified by 'youpassword' with grant option;

注意:远程连接的密码 与上面设置的要一致 ,这个是做的远程的登录的用户 密码  

全部开放

GRANT ALL PRIVILEGES ON . TO ‘root’@‘%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;

指定ip开放

GRANT ALL PRIVILEGES ON . TO ‘root’@‘192.168.12.1’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;

4、刷新权限flush privileges;
5、重启MySQLnet stop mysql,net start mysql

 

 

 

更改密码 的时候注意 版本不一样  命令不一样 

 错误原因: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USER 'root'@'localhost' IDENTIFIED BY 'mypass'' at line 1

MySQL 5.7.6 and later:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass'

MySQL 5.7.5 and earlier:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

 

 

大小写区分 (目前我没遇到)

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual thatcorresponds to your MySQL server version for the right syntax to use near '('123456') where user='root'' at line 1

终于找到了这个方法,成功解决!

ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

注意:部分需要大写!!!

 

 

端口未成功添加,可以telnet 进行测试 端口是否正常开发

sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport [端口号] -j ACCEPT

 

 

posted @   不会游泳的鱼丶  阅读(820)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2018-08-22 查看oracle数据库允许的最大连接数和当前连接数
点击右上角即可分享
微信分享提示