Closed chongma closed 3 years ago
The entrypoint only has an effect on uninitialized data directories.
Add a init-file configuration option pointing to your grant.sql file.
Thanks. Yes I tried the init-file route without luck. In the end I created a new installation and copied the mysql schema into my old one. i just needed to add back the users manually. Not sure how it got in that state
It occurs to me that [docker|podman] run -v entry:/docker-entrypoint-initdb.d -v data:/var/lib/mysql --init-file=/docker-entrypoint-initdb.d/grant.sql
may have been simpler.
mysqldump --system=users
is a way to get the users and grants with minimal manual work.
Somehow the root user has Grant_priv set to N
I have tried putting a file grant.sql containing
in the /docker-entrypoint-initdb.d directory but it doesn't have any effect