Sequel ProでMySQLにログインできない
Sequel ProからローカルのMySQLに接続しようとしたところ次のエラーが発生。。
MySQLの認証プラグインcaching_sha2_password
にSqquel Proが対応していないことが問題みたい。
ということでMySQLの設定を弄る。
mysql -u root mysql> select host, user, plugin from mysql.user; +-----------+------------------+-----------------------+ | host | user | plugin | +-----------+------------------+-----------------------+ | localhost | mysql.infoschema | caching_sha2_password | | localhost | mysql.session | caching_sha2_password | | localhost | mysql.sys | caching_sha2_password | | localhost | root | caching_sha2_password | +-----------+------------------+-----------------------+ mysql> ALTER USER 'root'@"localhost" IDENTIFIED WITH mysql_native_password BY ''; ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 51, found 49. Created with MySQL 80012, now running 80015. Please use mysql_upgrade to fix this error.
ここでまたもや問題発生。
mysql_upgrade
を実行しろとのこと。
mysql_upgrade -u root ~~~~ 省略 ~~~~ taskleaf_development.tasks OK taskleaf_development.users OK Upgrade process completed successfully. Checking if update is needed.
気を取り直して再度実行。
mysql> ALTER USER 'root'@"localhost" IDENTIFIED WITH mysql_native_password BY ''; Query OK, 0 rows affected (0.01 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> select host, user, plugin from mysql.user; +-----------+------------------+-----------------------+ | host | user | plugin | +-----------+------------------+-----------------------+ | localhost | mysql.infoschema | caching_sha2_password | | localhost | mysql.session | caching_sha2_password | | localhost | mysql.sys | caching_sha2_password | | localhost | root | mysql_native_password | +-----------+------------------+-----------------------+
その後、Sequel ProからMySQLに問題なく接続できた。 めでたしめでたし。