V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
MySQL 5.5 Community Server
MySQL 5.6 Community Server
Percona Configuration Wizard
XtraBackup 搭建主从复制
Great Sites on MySQL
Percona
MySQL Performance Blog
Severalnines
推荐管理工具
Sequel Pro
phpMyAdmin
推荐书目
MySQL Cookbook
MySQL 相关项目
MariaDB
Drizzle
参考文档
http://mysql-python.sourceforge.net/MySQLdb.html
Yang2333
V2EX  ›  MySQL

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

  •  
  •   Yang2333 · 2020-08-19 07:13:43 +08:00 · 1780 次点击
    这是一个创建于 1558 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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)
    
    
    2 条回复    2020-08-19 09:25:08 +08:00
    chotow
        1
    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
        2
    Yang2333  
    OP
       2020-08-19 09:25:08 +08:00
    @chotow 好的,感谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2981 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 13:22 · PVG 21:22 · LAX 05:22 · JFK 08:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.