环境:Red Hat Linux As 5
Mysql:5.22
1.检查是否安装了mysql
[root@hxl dev]# rpm -qa|grep mysql
libdbi-dbd-mysql-0.8.1a-1.2.2
php-mysql-5.1.6-5.el5
mysql-bench-5.0.22-2.1
mysql-5.0.22-2.1
mysql-server-5.0.22-2.1
mysql-connector-odbc-3.51.12-2.2
mod_auth_mysql-3.0.0-3.1
mysql-devel-5.0.22-2.1
2.启动mysql
[root@hxl dev]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
[root@hxl dev]# service mysqld status
mysqld is stopped
[root@hxl dev]# service mysqld start
mysql> show tables;
Starting MySQL: [ OK ]
3.进入Mysql
[root@hxl dev]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.22
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
+----------------+
| Tables_in_test |
+----------------+
| tb_test |
+----------------+
1 row in set (0.01 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hxl |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)
-- The End --
阅读(3656) | 评论(0) | 转发(1) |