mamp 重启之后, mysql 连接提示密码错误

2020-08-19 07:13:43 +08:00
 Yang2333

mysql 日志

mamp 重启了一下服务,就连接不上了,之前是正常的

2020-08-18T22:57:31.6NZ mysqld_safe Logging to '/Applications/MAMP/logs/mysql_error.log'.
2020-08-18T22:57:31.6NZ mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql57
2020-08-18T22:57:31.810140Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2020-08-18T22:57:31.810309Z 0 [Note] /Applications/MAMP/Library/bin/mysqld (mysqld 5.7.26) starting as process 15818 ...
2020-08-18T22:57:31.813242Z 0 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ is case insensitive
2020-08-18T22:57:31.815277Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-08-18T22:57:31.815316Z 0 [Note] InnoDB: Uses event mutexes
2020-08-18T22:57:31.815325Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-08-18T22:57:31.815332Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-18T22:57:31.815353Z 0 [Note] InnoDB: Adjusting innodb_buffer_pool_instances from 8 to 1 since innodb_buffer_pool_size is less than 1024 MiB
2020-08-18T22:57:31.815605Z 0 [Note] InnoDB: Number of pools: 1
2020-08-18T22:57:31.815710Z 0 [Note] InnoDB: Using CPU crc32 instructions
2020-08-18T22:57:31.816944Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-08-18T22:57:31.825488Z 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-18T22:57:31.840284Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2020-08-18T22:57:31.865236Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-18T22:57:31.865383Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-18T22:57:31.873949Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-08-18T22:57:31.874787Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2020-08-18T22:57:31.874808Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2020-08-18T22:57:31.875028Z 0 [Note] InnoDB: Waiting for purge to start
2020-08-18T22:57:31.929039Z 0 [Note] InnoDB: 5.7.26 started; log sequence number 3941949164
2020-08-18T22:57:31.929284Z 0 [Note] InnoDB: Loading buffer pool(s) from /Library/Application Support/appsolute/MAMP PRO/db/mysql57/ib_buffer_pool
2020-08-18T22:57:31.929363Z 0 [Note] Plugin 'FEDERATED' is disabled.
2020-08-18T22:57:31.934070Z 0 [Note] InnoDB: Buffer pool(s) load completed at 200819  6:57:31
2020-08-18T22:57:31.934276Z 0 [Warning] System table 'plugin' is expected to be transactional.
2020-08-18T22:57:31.935157Z 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2020-08-18T22:57:31.935201Z 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2020-08-18T22:57:31.935663Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2020-08-18T22:57:31.936300Z 0 [Warning] Insecure configuration for --pid-file: Location '/Applications/MAMP/tmp' in the path is accessible to all OS users. Consider choosing a different directory.
2020-08-18T22:57:31.939338Z 0 [Warning] System table 'time_zone_leap_second' is expected to be transactional.
2020-08-18T22:57:31.939379Z 0 [Warning] System table 'time_zone_name' is expected to be transactional.
2020-08-18T22:57:31.939388Z 0 [Warning] System table 'time_zone' is expected to be transactional.
2020-08-18T22:57:31.939396Z 0 [Warning] System table 'time_zone_transition_type' is expected to be transactional.
2020-08-18T22:57:31.939403Z 0 [Warning] System table 'time_zone_transition' is expected to be transactional.
2020-08-18T22:57:31.940484Z 0 [Warning] System table 'servers' is expected to be transactional.
2020-08-18T22:57:31.941665Z 0 [Note] Failed to start slave threads for channel ''
2020-08-18T22:57:31.949350Z 0 [ERROR] Incorrect definition of table mysql.db: expected column 'User' at position 2 to have type char(32), found type char(16).
2020-08-18T22:57:31.949532Z 0 [ERROR] mysql.user has no `Event_priv` column at position 28
2020-08-18T22:57:31.949806Z 0 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
2020-08-18T22:57:31.950009Z 0 [Note] /Applications/MAMP/Library/bin/mysqld: ready for connections.
Version: '5.7.26'  socket: '/Applications/MAMP/tmp/mysql/mysql.sock'  port: 0  MySQL Community Server (GPL)
2020-08-18T22:57:32.102035Z 5 [Note] Access denied for user 'root'@'localhost' (using password: YES)
2020-08-18T22:57:36.835424Z 7 [Note] Access denied for user 'root'@'localhost' (using password: YES)

1593 次点击
所在节点    MySQL
2 条回复
chotow
2020-08-19 08:20:34 +08:00
> Incorrect definition of table mysql.db: expected column 'User' at position 2 to have type char(32), found type char(16).

关键错误搜一下,猜测是 MySQL 5.6 升到了 5.7,而系统表没升级;可以尝试从这方面处理。
Yang2333
2020-08-19 09:25:08 +08:00
@chotow 好的,感谢

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/699476

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX