Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysql shell is not able to connect to mysql server

I am using windows machine. Everything is successfully installed. When I try to write mysql-js> mysql -u root -p in my MySql shell , it is showing unexpected identifier error. What should I write to connect to the mysql server?

like image 754
M thaker Avatar asked Jun 11 '17 08:06

M thaker


People also ask

Why is MySQL shell showing not connected?

The first step is that you need to check if you are in the MYSQL Shell SQL mode or JS mode. 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.

Why MySQL server is not connecting?

normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.


1 Answers

Just check you are in which mode. To go in sql mode

mysql-js> \sql

To connect:

mysql-js> \connect root@localhost

and enter password

like image 167
naruto_1906 Avatar answered Oct 13 '22 10:10

naruto_1906