Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create new database
#1
Using mysql 5.0 how do I create a new database?
Reply
#2

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




Reply
#3

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>
Reply
#4

mysql -u root -p

 

create database <name>;</name>

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)