Archive for the ‘MySQL’ Category
Install MySQL under CentOS via yum
October 2, 2011
Leave a comment
1. Install MySQL
#yum install mysql mysql-devel mysql-server
2. Set MySQL as a service and auto run with system
# chkconfig –add mysqld
# chkconfig –level 3 mysqld on
3. Set password for root — for first time only
# service mysqld start
# mysqladmin -u root password ‘new-password’
4. Test MySQL running
# mysql -u root -p
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| test |
+——————–+
3 rows in set (0.00 sec)
mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)