Skip to content

Howto create a MySQL database

January 30, 2007


root@calamity:/Sites/bbd# mysqladmin password [root_password]
root@calamity:/Sites/bbd# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 101 to server version: 5.0.24a-Debian_9-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DATABASE [dbase_name];
Query OK, 1 row affected (0.02 sec)
mysql> GRANT ALL PRIVILEGES ON [dbase_name].* TO [dbase_user]@localhost
-> IDENTIFIED BY [password];
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> EXIT
Bye

Advertisements

From → howto

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: