"MySQL USE"의 두 판 사이의 차이

잔글 (로봇: 자동으로 텍스트 교체 (-<source lang='dos'> +<source lang='cli'>))
2번째 줄: 2번째 줄:


==실습==
==실습==
<source lang='dos'>
<source lang='cli'>
[root@jmnote ~]# mysql -uroot -pP@ssw0rd
[root@jmnote ~]# mysql -uroot -pP@ssw0rd
Welcome to the MySQL monitor.  Commands end with ; or \g.
Welcome to the MySQL monitor.  Commands end with ; or \g.
10번째 줄: 10번째 줄:
ERROR 1046 (3D000): No database selected
ERROR 1046 (3D000): No database selected
</source>
</source>
<source lang='dos'>
<source lang='cli'>
mysql> SHOW DATABASES;
mysql> SHOW DATABASES;
+--------------------+
+--------------------+
21번째 줄: 21번째 줄:
3 rows in set (0.00 sec)
3 rows in set (0.00 sec)
</source>
</source>
<source lang='dos'>
<source lang='cli'>
mysql> USE mysql;
mysql> USE mysql;
Reading table information for completion of table and column names
Reading table information for completion of table and column names
28번째 줄: 28번째 줄:
Database changed
Database changed
</source>
</source>
<source lang='dos'>
<source lang='cli'>
mysql> SHOW TABLES;
mysql> SHOW TABLES;
+---------------------------+
+---------------------------+

2015년 2월 6일 (금) 02:40 판

MySQL use

1 실습

[root@jmnote ~]# mysql -uroot -pP@ssw0rd
Welcome to the MySQL monitor.  Commands end with ; or \g.
... (생략)

mysql> SHOW TABLES;
ERROR 1046 (3D000): No database selected
mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)
mysql> USE mysql;
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;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
... (생략)
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
23 rows in set (0.00 sec)

2 같이 보기

3 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}