How can DataGrip connect to mysql without password

已回答

I have installed an mysql server instance, the root user without password, when I connect to mysql server my shell, the command is

```

mysql -uroot

```

It's work fine.

But when I use DataGrip, in the General Tab, set Host:localhost,  Port:3306, User:root, and leave Password is blank. however, when I click the button 'Test Connection',  it's pop up a  dialog "The specified database user/password combination is rejected: [28000][1045] Access denied for user 'root'@'localhost' (using password: YES)" ask me Password!

So, How to connect to mysql without password?

2

When you connect with your tool, not datagrip you're using socket. https://dev.mysql.com/doc/refman/5.5/en/connecting.html

So, it's not the same.

 

If the host is not specified or is localhost, a connection to the local host is assumed:

On Windows, the client connects using a shared-memory connection, if the server has shared-memory connections enabled.

On Unix, the client connects using a Unix socket file. The --socket option or the MYSQL_UNIX_PORT environment variable may be used to specify the socket name.
-2

请先登录再写评论。