Results 1 to 6 of 6
Hi.
I have a MySQL server running, but do not have PHPMyAdmin installed (and want to keep it like that for the mean time).
Within MySQL, i have a database ...
- 03-30-2003 #1Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
Create MySQL Users?
Hi.
I have a MySQL server running, but do not have PHPMyAdmin installed (and want to keep it like that for the mean time).
Within MySQL, i have a database named "backenddb".
I access MySQL using the Linux Comand Line mysql utility.
How do i add a mysql user the ability to login and work within the backenddb database only? - using the command line utility?
Cheers,
Jason
- 03-30-2003 #2Linux Engineer
- Join Date
- Mar 2003
- Location
- U.S.A.
- Posts
- 1,025
Followup question is doesn't cron run as root? If so then you can run a script via cron or am I nuts or is it a bananna?
Dan
\"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"
- 03-30-2003 #3Just Joined!
- Join Date
- Mar 2003
- Location
- UK
- Posts
- 82
This would add the user 'newuser' with the password 'thepassword' and then give the user access to backenddb from any host with privelages to select, insert, update, delete, create and drop. Its not amazingly hard to userstand the bulk of it. So you'll be able to change anything you want or don't want quite easily.
This will need to be done as the root mysql user.
Code:mysql> use mysql; mysql> insert into -> user (host, user, password) -> values('%','newuser',password('thepassword')); mysql> insert into -> db (host,db,user,Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv) -> values ('%','backenddb','newuser','Y','Y','Y','Y','Y','Y'); mysql> quit
Ive never used the linux mysql util, but I am familer with mysql, and it all looks right from what I've learnt.
hope thats what you ment.
- 03-30-2003 #4Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
yes that is what i ment, only problem is i cannot login with my newly created user, even if i specify the username, password, and the database to use as command line switches.
transcript of session:
any ideas?Code:root@london:/data/web/this_site_does_not_exist# mysql -u phpbb -p --database=backenddb Enter password: ERROR 1045: Access denied for user: 'phpbb@localhost' (Using password: YES) root@london:/data/web/this_site_does_not_exist#
- 03-31-2003 #5Linux Engineer
- Join Date
- Mar 2003
- Location
- U.S.A.
- Posts
- 1,025
Checkout http://www.experts-exchange.com/Data..._10516859.html threads may help or not. Just a idea.
Dan
\"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"
- 08-13-2003 #6Just Joined!
- Join Date
- Aug 2003
- Posts
- 5
Re: Create MySQL Users?
mysql> grant all privileges on backenddb.* to newuser@localhost identified by 'password' ;
Originally Posted by Jaguar


Reply With Quote
