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

1.今天在使用MySQL创建数据库时出现如下报错:

mysql> CREATE USER 'dev'@'%' IDENTIFIED BY '';
ERROR (HY000): Column count of mysql.user is wrong. Expected , found . Created with MySQL , now running . Please use mysql_upgrade to fix this error.

2.解决方法

出现这个错误主要是因为我升级了数据库没有使用过,使用如下命令即可:

[root@vm172--- ~]# mysql_upgrade -u root -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
OK

3.再次创建数据库

mysql> CREATE USER 'dev'@'%' IDENTIFIED BY '';
Query OK, rows affected (0.00 sec)

发现成功创建!

MySQL报错ERROR 1558 (HY000): Column count of mysql.user is wrong.的更多相关文章

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

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

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

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

  3. 【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版本,执行以下命令报错 在网上查找原因说说因为升级 ...

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

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

  5. 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.

    centos7.5 登入mysql,进行授权报错 问题: mysql> grant all privileges on *.* to 'lvhanzhi'@'%' identified by ' ...

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

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

  7. 解决MySQL报错ERROR 2002 (HY000)【转】

    今天在为新的业务线搭架数据库后,在启动的时候报错 root@qsbilldatahis-db01:/usr/local/mysql/bin# ./mysql ERROR 2002 (HY000): C ...

  8. 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 ...

  9. MySQL报错ERROR 1436 (HY000): Thread stack overrun:

    今天搭私服的时候,卡在角色创建画面,日志报错如上. 这是MySQL报错ERROR 1436 (HY000): Thread stack overrun:   修改方法 vim /etc/my.cnf ...

随机推荐

  1. unsigned char idata temp[8];

    unsigned char 是无符号字符,单字节 idata 表示变量位于内部数据区,外部数据区是 xdata,代码区是 codeidata:固定指前面0x00-0xff的256个RAM,其中前128 ...

  2. Thymeleaf中href与 th:href的区别

    语法格式如下: <a th:href="@{/channel/page/add}">添加渠道 </a> <a href="/channel/ ...

  3. 马凯军201771010116《面向对象与程序设计Java》第十周学习总结

    一.理论知识学习部分 泛型类的约束与局限性: 不能用基本类型实例化类型参数 运行时类型查询只适用于原始类型 不能抛出也不能捕获泛型类实例 参数化类型的数组不合法 不能实例化类型变量 泛型类的 ...

  4. java ftp上传文件 工具类

    package com.learning.spboot.utils; import com.jcraft.jsch.*; import org.apache.commons.net.ftp.FTPCl ...

  5. 博客 新址: https://pheromone.github.io/

    该博客暂时调整歇业,小店地址暂时搬迁至: https://pheromone.github.io/ 该博客只做旧文章的维护工作. 博客 新址:  https://pheromone.github.io ...

  6. 关于下拉列表HtmlDownlistFor的使用

    1.定义下拉列表需要的数据 public static List<SelectListItem> GetProList() {   List<SelectListItem> i ...

  7. win7 安装用mingw编译的Qt源码并连接postgresql

    下载Qt 1.下载qt-creator-windows-opensource-2.8.0,下载路径:http://download.qt.io/official_releases/qtcreator/ ...

  8. vue.js 视频教程

    0.1智能社vuejs(1-11章全套) 0.2英文版learing vuejs 0.3Vue.js实战小米阅读开发 0.4走进Vue.js2.0 0.5Vuejs教程45节课 0.6Vue.js+N ...

  9. Microsoft宣布为Power BI提供AI模型构建器,关键驱动程序分析和Azure机器学习集成

    微软的Power BI现在是一种正在大量结合人工智能(AI)的商业分析服务,它使用户无需编码经验或深厚的技术专长就能够创建报告,仪表板等.近日西雅图公司宣布推出几款新的AI功能,包括图像识别和文本分析 ...

  10. knockout为绑定元素生成id

    knockout 提供生成了uniqueName的方法,但没有提供生成Id的方法. 感谢stackoverflow提供的思路与方法. 下面是uniqueName的实现方法. ko.bindingHan ...