首页 > 其他分享 >\1146 - Table 'performance_schema.session_variables' doesn't exist

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

时间:2023-08-22 15:00:22浏览次数:46  
标签:1146 GRANT variables IDENTIFIED doesn syntax root your localhost

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

 

 

标签:1146,GRANT,variables,IDENTIFIED,doesn,syntax,root,your,localhost
From: https://www.cnblogs.com/JIKes/p/17648540.html

相关文章

  • Cause: java.sql.SQLException: Field 'id' doesn't have a default value Field 'id&
    报错内容: 是因为实体类文件中设置主键自增的类型不对导致的,建议再温习一下逐渐自增的类型以及使用方式我自己的实体类里面设置的IdType为auto,但是主键id是char类型的,还不是int数值类型,所以无法设置为自增 这里需要换成IdType.ID_WORKER_STR@ApiModelProperty(......
  • 使用mysqldump备份数据库时报错表不存在,提示信息Table 'mysql.engine_cost' doesn't e
    问题描述:使用mysqldump备份数据库时报错表不存在,提示信息Table'mysql.engine_cost'doesn'texist,如下所示:数据库:mysql5.7.211、异常重现[mysql@hisdb1~]$mysqldump-uroot-S/mysql/data/mysql.sock-P3306--max_allowed_packet=1G--master-data=2--single-transaction......
  • 【CF1146F】Leaf Partition
    这个题还是蛮有趣的,其实弄清楚这个染色的方案,这个题还是简单的。本质上只是对于考虑对于连通块染色,但是带有一些限制。所以我们考虑在LCA上拼接若干条根到叶子的路径。那我们就可以依据这一想法来设计状态。第一是这个点没有染色,那我们记这一状态为\(h\)。第二是这个点连......
  • crispy_forms TemplateDoesNotExist
    django.template.exceptions.TemplateDoesNotExist:bootstrap4/uni_form.htmldjango.template.exceptions.TemplateDoesNotExist:bootstrap4/field.html问题:在使用django-crispy-forms时,跳转到signup页面出错django.template.exceptions.TemplateDoesNotExist:bootstrap......
  • 使用Echarts时报 Implementation of registerMap doesn't exists 错误解决办法
    最新的echarts在使用时,如果使用按需加载的方式引入依赖。在使用registerMap函数时会报错如果出现这两个错误:ImplementationofregisterMapdoesn'texists.或者Mapxxxnotexists.TheGeoJSONofthemapmustbeprovided.那么大概率是因为echarts升级后导致的不兼容问题。......
  • 视频融合平台EasyCVR迁移数据库报错1146是什么原因?该如何解决?
    EasyCVR视频融合平台基于云边端协同架构,具有强大的数据接入、处理及分发能力。平台支持多协议接入,包括:国标GB28181、RTMP、RTSP/Onvif、海康Ehome、海康SDK、大华SDK、宇视SDK等,对外可分发多格式视频流,包括RTSP、RTMP、FLV、HLS、WebRTC等。我们在此前的文章中也介绍过关于EasyC......
  • MySQL数据字典提示1146不存在的问题解决
    最近某套MySQL因为磁盘挂载问题,异常宕机,拉起后,数据库能正常访问了,但是在error.log一直提示这个错误,[ERROR]InnoDB:Table`mysql`.`innodb_table_stats`notfound.2021-09-03T08:26:52.446564Z2[ERROR]InnoDB:Fetchofpersistentstatisticsrequestedfortable`jira`.`c......
  • 使用Echarts时报 Implementation of registerMap doesn't exists 错误解决办法
    最新的echarts在使用时,如果使用按需加载的方式引入依赖。在使用registerMap函数时会报错如果出现这两个错误:ImplementationofregisterMapdoesn'texists.或者Mapxxxnotexists.TheGeoJSONofthemapmustbeprovided.那么大概率是因为echarts升级后导致的不兼......
  • Rust 声明式宏中的 Metavariables 有哪些
    Metavariables官方文档确实写得很好,但是缺少一些风味,容易催眠......
  • beego: panic: 'detail' method doesn't exist in the controller StudentController
    beego使用报错panic:'detail'methoddoesn'texistinthecontrollerStudentControllergoroutine1[running]:github.com/astaxie/beego.(*ControllerRegister).addWithMethodParams(0xc0000d8d10,0x164d100,0x7,0x1736900,0xc0000c37a0,0x0,0x0,0x......