|
Database HowTo's -
MySQL HowTo's
|
|
Written by Allen Sanabria
|
|
Sunday, 10 February 2008 00:02 |
|
How to create a database?
- By default mysql installs as the root user with no passwd (unless noted otherwise)
- Verify that mysql is running by one way (out of many ways). This is the command....
"ps -fe |grep mysqld |grep -v grep"The output should be similiar to this... /(usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock)
- Once you verified that mysql is running, log in to mysql using this command
- Run this command..
Now for the all in one Feature......
[root@s15261720 wiki]# ps -e |grep mysqld 7209 ? 00:00:00 mysqld_safe 7242 ? 00:00:12 mysqld
# mysql Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 24415 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql> create database test; Query OK, 1 row affected (0.00 sec)
mysql>
|
|
Last Updated ( Wednesday, 14 May 2008 11:53 )
|