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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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 ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
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:
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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
theGhost_k8Database ConsultantCommented:
Since no response from Author... Dividing points between experts.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.