For example, if you set:
MYSQL_DATABASE=mydb
MYSQL_USER=myuser
MYSQL_PASSWORD=mypassword
The myuser will have full privileges (such as SELECT, INSERT, UPDATE, DELETE, etc.) on mydb but will not have privileges on other databases unless explicitly granted later.
MYSQL need port 3306, you can map different port from 0.0.0.0 to 3306
You will need a ini file to grant global permission to docker mysql user if you want to
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%'; FLUSH PRIVILEGES;
No comments:
Post a Comment