Click to See Complete Forum and Search --> : Seting Up Users in MySQL
Hi! I'm looking to set up some users in MySQL. I want to have a single user able to access a database. I've tried doing "mysqladmin -u username --password='asdassd'" and the same thing with mysqlaccess, but nothing's happening right. I'm just a newb with a misunderstanding. Do users not work quite like they do in UNIX?
which database did u add the user too? did you give the account in question usage rights on the database?
generally the sql syntax goes like this
use <database>;
grant <permission> on <database> to <user> identified by <password>
i think thats the correct syntax someone correct if im wrong
So alright, I have to log in as the mysql / root user, create a database, and then using that database, do the grant command, which includes the name of said database?
db369
12-18-2003, 12:13 AM
4.4.5 Adding New Users to MySQL (http://www.mysql.com/doc/en/Adding_users.html)
you might find this link useful.
voidinit
12-18-2003, 12:16 AM
Admining MySQL from inside MySQL is very challenging. It's good to know how to do it, so read the MySQL manual on the grant commands or use UPDATE commands.
Once you've got the basic hand of that try using mysqlcc from MySQL. This will only work if you use X windows and sure saves a lot...and I mean a lot..of time and frustration.
However, MySQLcc isn't perfect, so be sure you know how to do things manually if the going gets rough.
Originally posted by nko
So alright, I have to log in as the mysql / root user, create a database, and then using that database, do the grant command, which includes the name of said database? Basically yes.
Yes, you have to login as root. No need to create a database, use the 'test' database to experiment. As you already said, use the GRANT its the easiest of all.
Do check the MySQL manual for the syntax.
regards
akr