creating a database and user

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
enemeth
Forum Commoner
Posts: 66
Joined: Tue Mar 27, 2007 8:55 am

creating a database and user

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Do you use cpanel?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: creating a database and user

Post 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
Post Reply