Home ›
See list of MySQL databases via GNU Linux shell command lineSee list of MySQL databases via GNU Linux shell command line
Submitted by Benjamin Melançon on November 19, 2007 - 3:21am
Searched words:
mysql list databases command line
check if database exists
Dirty secret is this will work with Windows or anything else that runs MySQL, as well as the recommended Debian, Ubuntu, Red Hat / RHEL (which is what CentOS really is) etc.
mysql -u root -p
(The long form, which is quite unnecessary, is " mysql --user=user-name --password=your-password")
Once in the MySQL command line utility:
SHOW DATABASES;
Then to see what's in a particular database:
USE agaric_example
SHOW TABLES;
(None of this has to be capital letters; I'm just used to that from MySQL convention.)


Comments
Post new comment