You can also check privileges in MySQL and grant permission or access to the database for the user using the show grants commands. you should be very careful when you run these commands on the server. We can also use SQLYog to perform this task graphically using the software where you don’t need to remember the syntax.
Grant Permission On Database In Server:
you can see permission on particular database before giving it to the user. if you want to give all the privileges to the user, it means they can do anything they want on the database. you can not log in to the MySQL server and access the database. So we will have to give grant permission on the database for a user. By default, MySQL does not assign any access to the database. you need to secure and remove the test database from the MySQL server.
Step 1: Create a User
CREATE USER ‘abc’@’192.168.1.7x’ IDENTIFIED BY ‘password’;
Step 2: Create a DATABASE
CREATE DATABASE grafana;
Step 3: Grant all Permission On Databases
GRANT ALL PRIVILEGES ON grafana.* TO 'abc'@'192.168.1.73' IDENTIFIED BY 'password';
Step 4: Flush Privileges;
You’re done permissions grant access for user mysql show privileges database