docker-library / mysql

Docker Official Image packaging for MySQL Community Server
https://dev.mysql.com/
GNU General Public License v2.0
2.46k stars 2.19k forks source link

mysql:oracle stopped working after recent pull #1051

Closed rahul-gharat closed 5 months ago

rahul-gharat commented 5 months ago

Hi, I was using mysql:oracle docker image. After recent pull it stopped working wit following error

Creating network "self-hosted_default" with the default driver
Creating dronahq-self-hosted-mysqldb ... done
Attaching to dronahq-self-hosted-mysqldb
dronahq-self-hosted-mysqldb | 2024-05-02 12:37:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el8 started.
dronahq-self-hosted-mysqldb | 2024-05-02 12:37:18+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
dronahq-self-hosted-mysqldb | 2024-05-02 12:37:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el8 started.
dronahq-self-hosted-mysqldb | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:19.218787Z 0 [System] [MY-015015] [Server] MySQL Server - start.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:19.548880Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.4.0) starting as process 1
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:19.557373Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:20.479427Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:21.366200Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:21.366236Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:21.369897Z 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.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:21.376147Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default_authentication_plugin=caching_sha2_password'.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:21.377614Z 0 [ERROR] [MY-010119] [Server] Aborting
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:22.927258Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.4.0)  MySQL Community Server - GPL.
dronahq-self-hosted-mysqldb | 2024-05-02T12:37:22.927283Z 0 [System] [MY-015016] [Server] MySQL Server - end.
ubuntu@ip-172-31-4-182:~/dronahq/self-hosted$

currently i am using mysql variable default-authentication-plugin=mysql_native_password. I am aware that it is depricated.

I intent to use username password based authentication for my database. please provide suggestions to resume my system and prevent data loss.

Thanks in advance

LaurentGoderre commented 5 months ago

Possibly a duplicate of #1048

tianon commented 5 months ago

Yep, this is by design -- upstream not only deprecated mysql_native_password, but it is now disabled by default in 8.4 because they intend to remove it completely, and your usage needs to adjust accordingly.

rahul-gharat commented 5 months ago

Please suggest steps to recover from this. I am willing to do required modifications.

yosifkit commented 4 months ago

From #1048

TLDR: Remove the --default-authentication-plugin=mysql_native_password and add --mysql-native-password=ON to command

rahul-gharat commented 4 months ago

worked for me. Thanks @yosifkit

tianon commented 4 months ago

https://github.com/docker-library/mysql/issues/1054#issuecomment-2099278269

With the caveat/warning that they do intend to remove that functionality completely in the future (so eventually the square wheel will roll again and this will come back out from under the rug :see_no_evil:).