Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Configure MySQL Remote Access
- sed -i '/^bind-address/s/bind-address.*=.*/bind-address = 0.0.0.0/' /etc/mysql/mysql.conf.d/mysqld.cnf
- mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO root@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;"
- service mysql restart
- mysql --user="root" --password="secret" -e "CREATE USER 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret';"
- mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'0.0.0.0' IDENTIFIED BY 'secret' WITH GRANT OPTION;"
- mysql --user="root" --password="secret" -e "GRANT ALL ON *.* TO 'homestead'@'%' IDENTIFIED BY 'secret' WITH GRANT OPTION;"
- mysql --user="root" --password="secret" -e "FLUSH PRIVILEGES;"
- mysql --user="root" --password="secret" -e "CREATE DATABASE homestead;"
- service mysql restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement