1. 安装mysql 

2. 启动mysql 服务,在终端输入如下语句:[root@localhost /]# etc/init.d/mysqld start

        Starting MySQL:                                            [  OK  ]

3. 登陆 [root@localhost /]# mysql -u root

4. 查看数据库  

mysql> show databases

    -> \g

5. 设定数据库  

 +--------------------+

| Database           |

+--------------------+

| information_schema | 

| mysql              | 

| test               | 

+--------------------+

3 rows in set (0.04 sec)

mysql> use test

6.查看该数据库下所有的表

mysql> show tables \g


posted on 2010-05-04 10:48  蚂蚁跳楼  阅读(150)  评论(0编辑  收藏  举报