|
[iyunv@CentOS ~]# mysql -u root -p ← 用root登录到MySQL服务器
Enter password: ← 输入MySQL的root用户密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 14 to server version: 4.1.20
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases; ← 查看当前存在的数据库
+-------------+
| Database |
+-------------+
| mysql |
| test | ← 确认刚刚被删除的test数据库已经成功被恢复回来!
+------------+
2 rows in set (0.00 sec)
mysql> use test ← 连接到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
mysql> show tables; ← 查看test数据库中存在的表
+-------------------+
| Tables_in_test |
+-------------------+
| test |
+-------------------+
1 row in set (0.00 sec)
mysql> select * from test; ← 查看数据库中的内容
+------+---------------------+
| num | name |
+------+---------------------+
| 1 | Hello,CentOS | ← 确认数据表中的内容与删除前定义的“Hello,CentOS”一样!
+------+---------------------+
1 row in set (0.01 sec)
mysql> exit ← 退出MySQL服务器
Bye
|
|