Page 1 of 1

creating a database and user

Posted: Wed Apr 25, 2007 10:00 pm
by enemeth
i need some help , i have to create a user in a database on my mysql database,

the instructions are very vaige i am very very new to the dabase world,

the instructions are as follows if someone can help me create this :

create your database and user, and assign that user to the database

i no how to create a database, but how do you create a user and assign it to the database? do they mean a table? and how many fields do i have to put in this table if it is a table, im soo sorry i really am just learning

ELaine

Posted: Thu Apr 26, 2007 9:35 am
by John Cartwright
Do you use cpanel?

Re: creating a database and user

Posted: Fri Apr 27, 2007 6:01 pm
by califdon
SQL has several categories of statements, some to establish and maintain databases and tables, some to manage data in a database, and some to manage users. You need to learn at least the basics of those. I assume that you used the "CREATE DATABASE xyz" statement to create your database. Now you need to use the "CREATE USER abc IDENTIFIED BY pwd" statement to create a user, then the "GRANT USER ... " statement to grant privileges to the user you have added. You will need the appropriate privileges yourself, in order to do that.
Check these links to documentation:

http://mysql.org/doc/refman/5.0/en/adding-users.html
and
http://mysql.org/doc/refman/5.0/en/grant.html