ramrocket
asked on
Create a User
I want to create a user that can acesss MySQL from any remote machine. Just can't seem to find a way in my MyPHPAdmin 4.0. Can you give the steps including grant privilege?
many thanks,
many thanks,
GRANT ALL ON db_name.* TO 'user'@'%' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'username'@'%' IDENTIFIED BY 'password';
ASKER
I typed this in my sql query window:
GRANT ALL ON * . * TO 'NetUser'@'%' IDENTIFIED BY '12345'
I get this error:
#1045 - Access denied for user 'spatial'@'localhost' (using password: YES)
GRANT ALL ON * . * TO 'NetUser'@'%' IDENTIFIED BY '12345'
I get this error:
#1045 - Access denied for user 'spatial'@'localhost' (using password: YES)
ASKER
I am logged in to the cpanel as "spatial"
You may need to specify the database to which you have rights. See post by todd_farmer above.
ASKER
I tried Todd's suggestion also but got a diff error:
GRANT ALL ON test . * TO 'NetUser'@'%' IDENTIFIED BY '12345'
#1044 - Access denied for user 'spatial'@'localhost' to database 'test'
GRANT ALL ON test . * TO 'NetUser'@'%' IDENTIFIED BY '12345'
#1044 - Access denied for user 'spatial'@'localhost' to database 'test'
Check to make sure you have the GRANT OPTION for your account:
SHOW PERMISSIONS;
SHOW PERMISSIONS;
ASKER
Sorry I am new to MySQL.
I type SHOW PERMISSIONS in my SQL query window and got this
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PERMISSIONS' at line 1
I type SHOW PERMISSIONS in my SQL query window and got this
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PERMISSIONS' at line 1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Grant looks like:
GRANT USAGE ON *.* TO 'spatial'@'localhost' IDENTIFIED BY PASSWORD '719048d343eed738'
GRANT USAGE ON *.* TO 'spatial'@'localhost' IDENTIFIED BY PASSWORD '719048d343eed738'
ASKER
If I want to use this username as a remote login, what grant options do I need to give this user? and how to do that?
Ah. That user does not have permission to grant privileges to other users. 'USAGE' is a synonym for 'no privileges'.
http://dev.mysql.com/doc/refman/5.0/en/grant.html
http://dev.mysql.com/doc/refman/5.0/en/grant.html
ASKER
So, can I still use login remotely using this account or not?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys, I split the points to both of you. Now I know what to do.