ERROR 1805(HY000):mysql.user的列数错误。预计45,发现48.该表可能已损坏

时间:2017-10-14 11:55:09

标签: mysql

我的mysql问题如下:

17:22:05,263 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
17:22:05,263 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
17:22:05,263 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/C:/Learnings/salesforce-rest-starter/target/classes/logback.xml]
17:22:05,341 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
17:22:05,356 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
17:22:05,356 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
17:22:05,450 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead.
17:22:05,450 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
17:22:05,450 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
17:22:05,450 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework] to DEBUG
17:22:05,450 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.springframework] to false
17:22:05,450 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[org.springframework]
17:22:05,450 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.example.SalesforceRestStarter] to DEBUG
17:22:05,450 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.example.SalesforceRestStarter] to false
17:22:05,450 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[com.example.SalesforceRestStarter]
17:22:05,450 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to ERROR
17:22:05,450 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
17:22:05,450 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
17:22:05,450 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@28f67ac7 - Registering current configuration as safe fallback point

RESPONSE :: ==> HTTP/1.1 400 Bad Request
Exception in thread "main" java.lang.NullPointerException
    at com.example.SalesforceRestStarter.main(SalesforceRestStarter.java:48)

有没有人遇到这个问题?谢谢

3 个答案:

答案 0 :(得分:4)

使用以下脚本:

alter table user drop column is_role;
alter table user drop column default_role;
alter table user drop column max_statement_time;
alter table user modify max_user_connections int(11) unsigned NOT NULL DEFAULT '0';
flush privileges;

信用: https://www.percona.com/forums/questions-discussions/mysql-and-percona-server/48583-column-count-of-mysql-user-is-wrong-expected-45-found-48

答案 1 :(得分:3)

答案 2 :(得分:0)

对我来说,此问题是在我从PHP5升级到PHP7之后发生的。我需要进入PHP.ini(xampp / php / php.ini)并取消注释以下行:

extension=mysqli

重新启动xampp,很高兴!