Linux-Noob Forums

Full Version: create new database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Using mysql 5.0 how do I create a new database?

here's a sample of how to do that

 

Create a mysql database:

 

The word "exercise" below being used in the comands is the name of the database change it to what your database name is going to be called.

 

 



Code:
cd /usr/local/mysql/bin

./mysql -u root -p

enter the "password"

use mysql;

INSERT INTO db (host,db,user,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Dro
p_priv) values ('localhost','exercise','root','Y','Y','Y','Y','Y','Y');




 

taken from the LAMP section here

 

 

now type

Code:
quit




 

then

 



Code:
./mysqladmin -u root -p create exercise





Thank You

 

Quote:here's a sample of how to do that 

Create a mysql database:

 

The word "exercise" below being used in the comands is the name of the database change it to what your database name is going to be called.

 

 



Code:
cd /usr/local/mysql/bin

./mysql -u root -p

enter the "password"

use mysql;

INSERT INTO db (host,db,user,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Dro
p_priv) values ('localhost','exercise','root','Y','Y','Y','Y','Y','Y');

<div>


 

taken from the LAMP section here

 

 

now type

Code:
quit




 

then

 



Code:
./mysqladmin -u root -p create exercise




</div>

mysql -u root -p

 

create database <name>;</name>