Hello, I have had a copy of a db's files saved for some while now and I would like to use it again. However when I copied the db back and started the container it stopped and show the following:
2024-07-29 11:03:47+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-07-29 11:03:47+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.1-1.el9 started.
2024-07-29 11:03:47+00:00 [Note] [Entrypoint]: Initializing database files
2024-07-29T11:03:47.592102Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2024-07-29T11:03:47.593441Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 9.0.1) initializing of server in progress as process 81
2024-07-29T11:03:47.595023Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
2024-07-29T11:03:47.595028Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2024-07-29T11:03:47.595076Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-07-29T11:03:47.595531Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
So, I decided to give the container all permissions so it looked like this (I just remove the rest of the files here so it wasnt too long)
Hello, I have had a copy of a db's files saved for some while now and I would like to use it again. However when I copied the db back and started the container it stopped and show the following:
So, I decided to give the container all permissions so it looked like this (I just remove the rest of the files here so it wasnt too long)
Can somebody tell me why this isn't working and a possible fix, Thanks.