1. Enable Remote Access
Open
1 | /etc/mysql/my.cnf |
Comment bind-address = 127.0.0.1
as below:
1 | # localhost which is more compatible and is not less secure. |
Restart MySQL service with
1 | /etc/init.d/mysql restart |
to make changes into effect.
2. Create a New User
Login MySQL as root, then run the code as below[change the field you want]:
1 | CREATE USER 'USER_NAME'@'localhost' IDENTIFIED BY 'NEW-PASSWORD'; |
3. Enable root
remote access, better not do this
1 | GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password'; |