Error on Show databases MySql

Hi Experts,

I am not able to view databases using MySQL command line shell. When I enter the command SHOW DATBASES I get an error NOT CONNECTED.
Is there some config change or another way to view the databases?
Shravan VishwanathanAsked:
Who is Participating?
theGhost_k8Database ConsultantCommented:
Please provide with detailed information of what and how you're connecting starting with what mysql version you're using.
I'd still suggest you to see if using "\connect" command works for you.

Ryan ChongCommented:
When I enter the command SHOW DATBASES I get an error NOT CONNECTED.
i believe you need to first establish the connection to your database before you can use the following command(s)

4.2.2 Connecting to the MySQL Server
Shravan VishwanathanAuthor Commented:
Still the same issue. The mysql instance is already running.
Ryan ChongCommented:
ok, mysql instance already running is step 1. as stated in the link provided, step 2 is using the command below to connect to database.


shell> mysql -h localhost -u myname -ppassword mydb

Open in new window

alternatively, use tool such as MySQL Workbench so that you can have a user-friendly interface to connect to the database.

you can download and install it from this URL:

more info about MySQL Workbench
theGhost_k8Database ConsultantCommented:
Since no response from Author... Dividing points between experts.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.