[root@localhost~]# mysql -u root -p #老徐注释:输入左侧命令,回车 root是用户名
--End--Enter password: #老徐注释:输入密码
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
[url=]Server[/url] version: 5.6.23-log Source distribution
Copyright (c) 2000, 2015, [url=]Oracle[/url] and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> #老徐注释:如果看到如上信息代表已经进入mysql
mysql> show databases; #老徐注释:输入左侧命令,回车
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
mysql> #老徐注释:如上就是显示当前存在的数据库
mysql> use mysql #老徐注释:左侧,use 表名,使用某个表
Database changed
mysql> show tables; #老徐注释:显示当前数据库下的所有表名
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| innodb_index_stats |
| innodb_table_stats |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| servers |
| slave_master_info |
| slave_relay_log_info |
| slave_worker_info |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
28 rows in set (0.00 sec)
mysql>
lsekfe 发表于 2016-3-1 13:53
LZ 排版有点乱了,建议重新编辑下!
xuquan 发表于 2016-3-1 14:07
现在应该ok了, 从博客贴过来的 格式有点乱
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |