MySQL List Databases
Q. How do I display a list of all databases under MySQL Server?
A. Use show databases sql command. First you need to login as mysql database root user using mysql command line client. Type the following command to login with a password at a shell prompt:
$ mysql -u root -p
At mysql prompt type the following command:
mysql> show databases;
Sample output:
+--------------------+ | Database | +--------------------+ | information_schema | | mysql | | wiki | +--------------------+ 3 rows in set (0.03 sec)
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- MySQL command to show list of databases on server
- GUI Tools for managing MySQL databases server
- MySQL Run SQL Queries From A Shell Prompt / Command Line
- How can I restore a backup of a MySQL database?
- Howto: Backup CentOS / Fedora Linux / Red Hat Enterprise Linux server system
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: command line client, databases, list server, mysql database, mysql server, output database, root user, schema, sql command




July 4th, 2008 (5 days ago) at 7:04 pm
for me some of the databases are not listing wven though complete privilleges are given and i checked same on mysql.db table also .Please help me out