MySQL privileges granting

Moderator: cah

Post Reply
cah
General of the Army / Fleet Admiral / General of the Air Force
General of the Army / Fleet Admiral / General of the Air Force
Posts: 1342
Joined: Sun Aug 17, 2008 5:05 am

MySQL privileges granting

Post by cah »

In order to make it work between CGI and MySQL, privilege granting from command line is needed.

1. Log in to MySQL as root or admin user
2. Grant privileges to user(s)

Code: Select all

mysql> GRANT ALL PRIVILEGES ON Gemini_Twins.* TO 'gtdba'@'%' IDENTIFIED BY PASSWORD '*981197945B47C87724B0FDB0CCBA03BF38FB9232' WITH GRANT OPTION;
Query OK, 0 rows affected (0.02 sec)
3. Show grant privileges

Code: Select all

mysql> show grants for gtdba;                                                   
+------------------------------------------------------------------------------+
| Grants fortdba@%                                                             |
+------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON `Gemini_Twins`.* TO 'gtdba'@'%' WITH GRANT OPTION    |
+------------------------------------------------------------------------------+
Then, CGI is able to communicate with database schema and table.
CAH, The Great
Post Reply