database access

If user does not have the access of database  You can not login to the Mysql server And Access the database. So we will have to give grant permission on database for a user.

Step 1 : Create a User 

mysql> CREATE USER ‘abc’@’192.168.1.7x’ IDENTIFIED BY ‘password’;

Query OK, 0 rows affected (0.01 sec)

Step 2 : CREATE A DATABASE

mysql> CREATE DATABASE grafana;

Query OK, 1 row affected (0.00 sec)

Step 3 : Grant Permission On Database

mysql> GRANT ALL PRIVILEGES ON grafana.* TO ‘abc’@’192.168.1.7x’ IDENTIFIED BY ‘password’;

Query OK, 0 rows affected, 1 warning (0.00 sec)

Step 4 : Flush Privileges;

You’re done

Sponsored

LEAVE A REPLY

Please enter your comment!
Please enter your name here