MySQL error: [MY-013360] ''sha256_password' is deprecated use caching_sha2_password instead' #997

Closed
opened 2026-10-05 00:27:41 +02:00 by adam · 8 comments
Owner

Piwigo in a container linuxserver/piwigo connecting to a mysql 8.0.17 server mysql/mysql-server
Gives the below error:
[Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

Full mysql containter log:

[Entrypoint] Starting MySQL 8.0.17-1.1.12
2019-12-01T19:40:48.431829Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 7
2019-12-01T19:41:26.638205Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-12-01T19:41:28.004782Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.17'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
2019-12-01T19:41:29.293648Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
[Entrypoint] MySQL Docker Image 8.0.17-1.1.12
[Entrypoint] Starting MySQL 8.0.17-1.1.12
2019-12-27T18:14:14.874508Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 6
2019-12-27T18:14:45.137544Z 0 [System] [MY-010229] [Server] Starting crash recovery...
2019-12-27T18:14:45.196023Z 0 [System] [MY-010232] [Server] Crash recovery finished.
2019-12-27T18:14:48.567832Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-12-27T18:14:49.717269Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.17'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
2019-12-27T18:14:51.072796Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
2020-01-10T13:04:11.046814Z 38949 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2020-01-10T13:04:40.738262Z 38951 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2020-01-10T13:27:27.988130Z 38996 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2020-01-10T13:28:37.908174Z 39000 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'```

Requirements seem to only be "MySQL 5 or greater or MariaDB equivalent" ? 

<!-- github-sync-id:548086244 -->
Piwigo in a container `linuxserver/piwigo` connecting to a mysql 8.0.17 server `mysql/mysql-server` Gives the below error: ```[Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'``` Full mysql containter log: ```[Entrypoint] MySQL Docker Image 8.0.17-1.1.12 [Entrypoint] Starting MySQL 8.0.17-1.1.12 2019-12-01T19:40:48.431829Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 7 2019-12-01T19:41:26.638205Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2019-12-01T19:41:28.004782Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.17' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL. 2019-12-01T19:41:29.293648Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060 [Entrypoint] MySQL Docker Image 8.0.17-1.1.12 [Entrypoint] Starting MySQL 8.0.17-1.1.12 2019-12-27T18:14:14.874508Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 6 2019-12-27T18:14:45.137544Z 0 [System] [MY-010229] [Server] Starting crash recovery... 2019-12-27T18:14:45.196023Z 0 [System] [MY-010232] [Server] Crash recovery finished. 2019-12-27T18:14:48.567832Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2019-12-27T18:14:49.717269Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.17' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL. 2019-12-27T18:14:51.072796Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060 2020-01-10T13:04:11.046814Z 38949 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead' 2020-01-10T13:04:40.738262Z 38951 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead' 2020-01-10T13:27:27.988130Z 38996 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead' 2020-01-10T13:28:37.908174Z 39000 [Warning] [MY-013360] [Server] Plugin sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'``` Requirements seem to only be "MySQL 5 or greater or MariaDB equivalent" ? <!-- github-sync-id:548086244 -->
adam closed this issue 2026-10-05 00:27:41 +02:00
Author
Owner

Hi @Nornode

There is no such sha256_password in Piwigo codebase. It's most certainly a packaging issue. I have no idea who provides this package :-/

Hi @Nornode There is no such `sha256_password` in Piwigo codebase. It's most certainly a packaging issue. I have no idea who provides this package :-/ <!-- github-comment-id:573070954 -->
Author
Owner

Hi, Thanks for your answer.
The container is the one from Linuxserver group:
https://github.com/linuxserver/docker-piwigo/blob/master/Dockerfile
The Docker file seems to be downloading the latest release of piwigo:
PIWIGO_RELEASE=$(curl -sX GET "https://api.github.com/repos/Piwigo/Piwigo/releases/latest"

So which package are you refering to?

Hi, Thanks for your answer. The container is the one from Linuxserver group: https://github.com/linuxserver/docker-piwigo/blob/master/Dockerfile The Docker file seems to be downloading the latest release of piwigo: `PIWIGO_RELEASE=$(curl -sX GET "https://api.github.com/repos/Piwigo/Piwigo/releases/latest"` So which package are you refering to? <!-- github-comment-id:573547513 -->
Author
Owner

php mysqli extension does not yet support caching_sha2_password. You must use mysql native password.
In docker add command in the service :

services:
  database_service:
    image: mysql:8.0
    command: --default-authentication-plugin=mysql_native_password
   ...
php mysqli extension does not yet support caching_sha2_password. You must use mysql native password. In docker add command in the service : ```yml services: database_service: image: mysql:8.0 command: --default-authentication-plugin=mysql_native_password ... ``` <!-- github-comment-id:573554345 -->
Author
Owner

So, is this something that should be fixed upstream instead?
At the moment this "MySQL 5 or greater or MariaDB equivalent" ain't true then...

So, is this something that should be fixed upstream instead? At the moment this "MySQL 5 or greater or MariaDB equivalent" ain't true then... <!-- github-comment-id:573579943 -->
Author
Owner

I don't know who is upstream but it's not related to piwigo but to people who make docker images for piwigo.

I don't know who is upstream but it's not related to piwigo but to people who make docker images for piwigo. <!-- github-comment-id:573599410 -->
Author
Owner

Upstream as in 'php7-mysqli' and your suggestion is that this issue should be fixed by them?

Linuxserver.io clearly don't make any changes to the way the background services are used.
Making changes to the other (or any) image/service just means that (again) that "MySQL 5 or greater or MariaDB equivalent" isn't fully true?

Upstream as in 'php7-mysqli' and your suggestion is that this issue should be fixed by them? Linuxserver.io clearly don't make any changes to the way the background services are used. Making changes to the other (or any) image/service just means that (again) that "MySQL 5 or greater or MariaDB equivalent" isn't fully true? <!-- github-comment-id:573676053 -->
Author
Owner

linuxserver only provides (as far as I read) the image (build from Dockerfile) for piwigo. It's up to you to manage the database through another docker images or a "real" server.
The small piece of configuration I gave you is from a docker-compose file using a mysql:8 docker images.

linuxserver only provides (as far as I read) the image (build from Dockerfile) for piwigo. It's up to you to manage the database through another docker images or a "real" server. The small piece of configuration I gave you is from a docker-compose file using a mysql:8 docker images. <!-- github-comment-id:573689724 -->
Author
Owner

I get it.
I'm sorry for my ignorance and my knowledge may be limited.
However, if the new way of authenticating toward a MySQL DB is the "caching_sha2_password", shouldn't Piwigo support that instead of adjusting other default parameters in other software?

I get it. I'm sorry for my ignorance and my knowledge may be limited. However, if the new way of authenticating toward a MySQL DB is the "caching_sha2_password", shouldn't Piwigo support that instead of adjusting other _default_ parameters in _other_ software? <!-- github-comment-id:573805625 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#997