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.

Refer: https://dev.mysql.com/doc/mysql-shell-excerpt/5.7/en/mysql-shell-commands.html
0
 
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
https://dev.mysql.com/doc/refman/5.7/en/connecting.html
0
 
Shravan VishwanathanAuthor Commented:
Still the same issue. The mysql instance is already running.
0
 
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.

like:

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:
https://dev.mysql.com/downloads/workbench/

more info about MySQL Workbench
https://www.mysql.com/products/workbench/
0
 
theGhost_k8Database ConsultantCommented:
Since no response from Author... Dividing points between experts.
0
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.