How to fix docker - error creating container: initialize specified but the data directory has files

Subscribers:
4,970
Published on ● Video Link: https://www.youtube.com/watch?v=pFQC2F8SRag



Duration: 4:13
144 views
1


i got an error when creating new container from mysql image.

docker run --name my-container-app -d -p 3307:3306 ........ -v my-container-app:/var/lib/mysql mysql:5.7

the error is something like this:
docker logs my-container-app
--initialize specified but the data directory has files in it. Aborting.

the issue is about the volume.

see this video for detail.




Other Videos By Ambar Hasbiyatmoko


2023-09-06How to fix error removing package in ubuntu - Malformed entry 11 in list file etc-apt-sources.list
2023-08-20MySQL 5.7 - Setup master to master replication dengan docker di Ubuntu 20.04
2023-08-14How to fix wordpress - The server cannot process the image. This can happend if the server is busy
2023-07-30Ubuntu 22.04 - Open user's folder in home - Authentication is required to run gvfsd admin daemon
2023-07-29How to solve ssh in ubuntu - Failed to restart sshd.service: Unit sshd.service not found
2023-07-28Mengganti port SSH 22 ke port lain di Server Ubuntu (digitalocean)
2023-07-19Menggunakan .env variable pada codeigniter 3
2023-07-11Ubuntu 19.10 : The repository 'archive.ubuntu.com ubuntu eoan Release' does not have a Release file
2023-07-11How to fix repository - ascii codec can't decode by 0xc5 in position 92, ordinal not in range128
2023-07-02Setup mysql 5.7 with docker on VPS
2023-07-01How to fix docker - error creating container: initialize specified but the data directory has files
2023-06-30How to fix: Let’s Encrypt issue in alpine linux - SSL certificate problem certificate has expired
2023-06-25How to fix an issue in wordpress - download link with HTTP format not working in wordpress
2023-06-25How to solve wordpress - Article get 404 not found, The requested URL was not found on this server
2023-06-24How to fix error when installing wordpress - Uncaught Error: Call to undefined function wp()
2023-06-20Menghapus file logs loadbalancer pada S3 bucket secara otomatis menggunakan lifecycle rules
2023-06-12How to fix php-memcached in alpine - Cannot find autoconf. Please check your autoconf installation
2023-06-11Mengaktifkan logs pada Application Load Balancer (ALB) di Cloud AWS
2023-06-09Docker - Install nginx dan php-fpm7.3 di alpine image dan build container menjadi image baru
2023-06-07How to fix kubernetes error - pods is stuck on ContainerCreating, cni0 already has an IP address
2023-05-30How to fix php-fpm7.2 error in alpine container - The application environment is not set correctly



Tags:
docker
container
run
mysql
image
volume
ubuntu
vps
terminal
server
create
linux
fix
error
logs