gpt4 book ai didi

mysql - 如何从 Sequel Pro 连接到 docker mysql 容器

转载 作者:行者123 更新时间:2023-11-29 06:38:44 27 4
gpt4 key购买 nike

我花了近两周的时间在谷歌上搜索这个问题并尝试了很多不同的解决方案,但似乎没有一个对我有用。

我正在使用 Docker for Mac(我的工具栏中有一个鲸鱼图标)。

我正在使用此命令创建 mysql 容器:

docker container run -d -p 3306:3306 --name=database -e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=local -e MYSQL_PASSWORD=local_password -v ~/.databases/mysql:/var/lib/mysql mysql

这是docker容器日志数据库的输出

2018-10-02T10:45:37.234437Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated
and will be removed in a future release.
2018-10-02T10:45:37.235186Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.12) starting as process 1
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
2018-10-02T10:45:37.927574Z 0 [System] [MY-010229] [Server] Starting crash recovery...
2018-10-02T10:45:37.927670Z 0 [System] [MY-010232] [Server] Crash recovery finished.
2018-10-02T10:45:38.012828Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-10-02T10:45:38.022161Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different
directory.
2018-10-02T10:45:38.034910Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.infoschema@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.034958Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.034976Z 0 [Warning] [MY-010315] [Server] 'user' entry 'mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.034988Z 0 [Warning] [MY-010315] [Server] 'user' entry 'root@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.035012Z 0 [Warning] [MY-010323] [Server] 'db' entry 'performance_schema mysql.session@localhost' ignored in --skip-name-resolve mode.2018-10-02T10:45:38.035036Z 0 [Warning] [MY-010323] [Server] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.035053Z 0 [Warning] [MY-010311] [Server] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.041121Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'user mysql.session@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.041159Z 0 [Warning] [MY-010330] [Server] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2018-10-02T10:45:38.048971Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.12' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL

我正在尝试使用以下设置从 Sequel Pro 连接到此容器:

Host: 127.0.0.1
Username: local
Password: local_password

我收到以下错误:

Unable to connect to host 127.0.0.1, or the request timed out.

Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).

MySQL said: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image not found

最佳答案

任何其他人遇到此问题,事实证明这是由于 mysql 的最新(8+)版本而发生的。 5.7版本运行良好。

关于mysql - 如何从 Sequel Pro 连接到 docker mysql 容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52606880/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com