Mysql ERROR : not connected Mysql ERROR : not connected sql sql

Mysql ERROR : not connected

My temporary workaround is that I make use of ssl protocol to connect to MySQL server :

MySQL> \connect root@localhost

MySQL localhost:33060+ ssl SQL > show databases;

The first step is that you need to check if you are in the MYSQL Shell SQL mode or JS mode.

Then if you are in SQL mode then you are good to go else you need to switch to SQL mode by this command


The next step is to connect using this command

\connect root@localhost

In your case, you might have given the privilege as the IP address so you need to check your localhost IP which can be done by this command in your command prompt.

ipconfig and then just check the IP address and put it in place of localhost in the previous command. If this still doesn't works then put

After this, it will prompt to add or save the password , enter a unique password there.

After this you are good to go and check the user and localhost after this by this command

SELECT user, host FROM mysql.user;

Try mysql -u root -pI haven't used MySQL shell, I typically use gitbash and it works just fine