Created
January 17, 2020 14:38
-
-
Save Nav-Appaiya/f30e71290e0f124e32148999cd11c318 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Spin up a docker mysql server with remote access | |
| docker run --name mysql-server \ | |
| -p 3306:3306 -p 33060:33060 \ | |
| -e MYSQL_ROOT_HOST='%' -e MYSQL_ROOT_PASSWORD='root' \ | |
| -d mysql/mysql-server:latest | |
| # login into the machine and create a nav user with nav password | |
| # connect | |
| mysql -u root -p -h 0.0.0.0 | |
| # create | |
| CREATE USER 'nav' IDENTIFIED BY 'nav'; | |
| # grant privileges | |
| GRANT ALL on *.* to 'nav'@'%' identified by 'nav'; | |
| #flush privileges | |
| FLUSH PRIVILEGES; | |
| exit -> try connecting now with remote server address and credentials. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment