centos7.5 登入mysql,进行授权报错

问题:

mysql> grant all privileges on *.* to 'lvhanzhi'@'%' identified by 'Bgx123.com';
ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50560, now running 50725. Please use mysql_upgrade to fix this error.

原因:

    错误是由于你曾经升级过数据库,升级完后没有使用,mysql_upgrade升级数据结构造成的。

解决方法:

[root@db01 ~]# mysql_upgrade -u root -p123456
[root@db01 ~]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.25-log MySQL Community Server (GPL) Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> grant all privileges on *.* to 'lvhanzhi'@'%' identified by 'Bgx123.com';
Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> grant replication slave,replication client on *.* to 'rep'@'172.16.1.%' identified by 'Rep123.com';
Query OK, 0 rows affected, 1 warning (0.00 sec)

ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 42. Created with MySQL 50560, now running 50725. Please use mysql_upgrade to fix this error.的更多相关文章

  1. ERROR 3009 (HY000): Column count of mysql.user is wrong…..

    在测试备份还原时,使用XtraBackup还原数据库后,创建一个测试账号时遇到了下面错误: mysql> grant all on house.* to test@'192.168.%' ide ...

  2. ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 43. Created with MySQL 5

    ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 43. Created with MySQL 5 ...

  3. Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50518, now running 50641. Please use mysql_upgrade to fix this error.

    出现问题: Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50518, now runn ...

  4. MySQL之ERROR 1558 (HY000): Column count of mysql.user is wrong.解决方案

    一.场景 我本想在MySQL5.7上执行下列语句创建一个新用户: CREATE USER "remote"@"%" IDENTIFIED BY "12 ...

  5. MySQL报错ERROR 1558 (HY000): Column count of mysql.user is wrong.

    MySQL报错ERROR 1558 (HY000): Column count of mysql.user is wrong. 1.今天在使用MySQL创建数据库时出现如下报错: mysql> ...

  6. Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50096, now running 50173.

    IDEA链接mysql提示 Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50096, ...

  7. 【转】【MySQL报错】ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 39.

    之前在centos6.4系统安装的是自带的mysql 5.1版本,后来升级到了5.6版本,执行以下命令报错 在网上查找原因说说因为升级不当导致,执行以下命令即可正常执行命令 mysql_upgrade ...

  8. 【MySQL报错】ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 39.

    原文参考:http://wuzhuti.cn/2348.html 之前在centos6.4系统安装的是自带的mysql 5.1版本,后来升级到了5.6版本,执行以下命令报错 在网上查找原因说说因为升级 ...

  9. MySQL报错】ERROR 1558 (HY000): Column count of mysql.user is wrong. Expected 43, found 39.

    之前在centos6.4系统安装的是自带的mysql 5.1版本,后来升级到了5.6版本,执行以下命令报错 在网上查找原因说说因为升级不当导致,执行以下命令即可正常执行命令 mysql_upgrade ...

随机推荐

  1. DataGridView控件用法合集

    1.当前的单元格属性取得.变更 Console.WriteLine(DataGridView1.CurrentCell.Value) Console.WriteLine(DataGridView1.C ...

  2. spark-shell下有提示了,但是发现不能退格

    配好了Spark集群后,先用pyspark写了两个小例子,但是发现Tab键没有提示,于是打算转到scala上试试,在spark-shell下有提示了,但是发现不能退格,而且提示也不是复写,而是追加,这 ...

  3. sql server case

    use mytest go exec p_city 2,4 exec p_city_cnt 2,3 select stuff((select ',' + city_id from cities for ...

  4. SQLGetEnvAttr

    SQLGetEnvAttr 函数定义: 用于得到当前环境的各项设置属性 SQLRETURN SQLGetEnvAttr( SQLHENV     EnvironmentHandle, SQLINTEG ...

  5. Intel 80386 微处理器的存储器管理

    一.存储器的管理       存储器的管理是一种硬件机制,微处理器在总线地址上对物理存储器进行寻址.但是,为了给程序提供比物理存储器容量更大的空间,就引入了虚拟存储器的概念,它在外存(比如磁盘)的支持 ...

  6. html中通过js获取接口JSON格式数据解析以及跨域问题

    前言:本人自学前端开发,一直想研究下js获取接口数据在html的实现,顺利地找到了获取数据的方法,但是有部分接口在调用中出现无法展示数据.经查,发现时跨域的问题,花费了一通时间,随笔记录下过程,以方便 ...

  7. Rpgmakermv(18)GALV RollCredits

    原文: Galv's Roll Credits ---------------------------------------------------------------------------- ...

  8. Windows server 2008 R2实现多用户远程连接 (转)

    经常使用远程桌面的朋友可能会注意到,Windows server 2008 R2中,远程桌面最多只允许两个人远程连接,第三个人就无法连接过去,但是生产环境中有一些服务器可能有许多人需要连接上去,而微软 ...

  9. 【2017-04-17】类库、通用变量、is和as、委托

    类库dll文件,里边有很多被编译后的C#代码,不可阅读,不可修改,只能调用 1.类库创建 新建项目为类库,类库文件编写完成后,选择生成—生成解决方案,在debug文件夹下找到dll文件 2.类库引用 ...

  10. 【2017-03-20】HTML框架,标题栏插入小图标,锚点,插入音频视频,滚动效果

    一.html框架   iframe 在网页中嵌入一个别的网页 1.格式: <iframe  src="链接地址" width="" height=&quo ...