Using a SSH Command to Connect Existing DBase User to Existing DBase?

tm2004

Member
Mar 1, 2005
23
0
151
Hey All...

Trying to figure this out... want to work with a shell command (instead of using cPanel). Want to create a new database and add an existing dbase user to that Dbase all via Shell


1. Create new Database
# mysql
# create database dom1_test1;

... WORKS


2. Then want to Connect User dom1_user9 (already have it setup via cPanel with august66 as password) with ALL privileges to the Dbase above...

# GRANT ALL PRIVILEGES ON dom1_test1 TO
'dom1_user9'@'localhost' IDENTIFIED BY 'august66' WITH GRANT OPTION;

... DOES NOT WORK

Have tried dozens of variations.. with no success.. Can anyone see what I am missing?
 

maheshkasbe

Registered
Aug 26, 2006
2
0
151
Mysql grant

Use this man You will get success,let me know if yes


mysql>GRANT ALL PRIVILEGES ON dom1_test1
TO dom1_user9@localhost IDENTIFIED BY "august66" WITH GRANT OPTION;


mysql>grant insert,delete,update,select on dom1_test1.*
to dom1_user8@localhost identified by "august66" ;


Both are same.:rolleyes:
 

tm2004

Member
Mar 1, 2005
23
0
151
Thanks for the reply. Can't get it to work..

Both commands respond with:

Query OK, 0 rows affected (1.16 sec)

but then cPanel still does NOT show the user connected to the dBase.. Driving me crazy! :rolleyes: