How can I add a MySql user that can access the database remotely?

Document ID : KB000098132
Last Modified Date : 07/06/2018
Show Technical Document Details
Question:
How can I add a MySql user that can access the database remotely?
Answer:
1. On the NFA console open a command prompt and run the following to login to mysql:
mysql -u root mysql

2. Then run the following commands using the username and password for the user you wish to create:
create user 'test_user'@'%' identified by 'password';
grant select on *.* to 'test_user';
FLUSH PRIVILEGES;

3. Then recycle the CA MySQL Service.

4. Then you can test access from another NFA server or server which has mysql installed,to see if you can get into the database by using the ip address of the server you are trying to access in place of x.x.x.x in the command below:
mysql -h x.x.x.x -u test_user -ppassword