การใช้คำสั่ง show databases; ใน MariaDB เพื่อแสดง Database

การใช้คำสั่ง show databases;  นั้นจะเป็นคำสั่งในการแสดง database ทั้งหมดที่ใน SQL Server ขึ้นมาแสดง  ทำให้เราเก็นรายละเอียดใน server  โดยใช้คำสั่งดังนี้


เช่นเดิมเราจะเข้าใช้งานโดยสิทธิ์ root นั้นเอง  สำหรับใครยังไม่เข้าใจการเข้าใช้งานย้อนไปดูได้  ที่นี่
แล้วเราจะพิมพ์คำสั่ง   show databases;  เท่านี้ก็ได้ข้อมูล database ที่มีอยู่มาแสดงแล้ว


C:\> cd "Program Files\MariaDB 10.1\bin"                            
C:\Program Files\MariaDB 10.1\bin> mysql -u root -p
Enter password: ********
MariaDB [(none)]> show databases;
 


C:\>cd "Program Files\MariaDB 10.1\bin"

C:\Program Files\MariaDB 10.1\bin>mysql -u root -p
Enter password: ********
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 4
Server version: 10.1.14-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+---------------------------------+
| Database                             |
+---------------------------------+
| information_schema             |
| mysql                                 |
| performance_schema           |
| test                                    |
+--------------------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]>






ไม่มีความคิดเห็น

ขับเคลื่อนโดย Blogger.