Kubernetes MySQL deployment encounters /var/lib/mysql unavailable error
P粉949848849
P粉949848849 2024-01-08 15:43:19
0
1
449

I am trying to create mysql container at mount path /var/lib/mysql in kubernetes, but when I deploy, I get the following error.

2022-12-16T07:13:59.139528Z 0 [Error] [MY-010457] [Server] --initialize was specified but there were files in the data directory. Aborting.

2022-12-16T07:13:59.139537Z 0 [Error] [MY-013236] [Server] The specified data directory /var/lib/mysql/ is not available. You can delete all files added to it by the server.

How to fix this error. I want to create a MySql container and store the database in some folder so that on new deployment I can get the old data.

P粉949848849
P粉949848849

reply all(1)
P粉788765679

Your directory is not empty. You must delete everything there or choose something else.

The error message "The newly created data directory /var/lib/mysql/ is not available" appears due to size issues. Check/increase the underlying server size or the docker size allocated for the system.

You can also create a docker container from the command line, populate the empty data directory with MySQL initialization, and then use docker-compose. When the data directory has been initialized, no error occurs.

Also check out the GitHub link and Stackpost.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!