Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql ERROR : not connected

I am trying to connect to MySQL database from MySQL shell on windows.

No matter what I type in MySQL shell, it keeps giving me error : 'Not connected'.

Query eg 1 : mysql --host=localhost --port=3306 --user=root -p;

Query eg 2 : mysql -u root -p

O/P : ERROR: Not connected

I have MySQL server installed on my machine. Also MySQL service is running in the background.

Also, I was able to connect from MySQL workbench.

ERROR MESSAGE

MySQL Workbench Connection

like image 392
Madhur Avatar asked May 19 '18 04:05

Madhur


1 Answers

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;

like image 114
Madhur Avatar answered Sep 18 '22 15:09

Madhur