1

I am new to using SQL and MySQL. I recently installed MySQL Server 8.0.25 on Windows 10. Everything appeared to be going fine at first, since I started the server for port 3306 (I checked on services and the status says 'running') and ran the command line client with no problems. I opened the command line client, entered my password and used the command 'create database databasename;'. This seemed to work as below it read "Query OK, 1 row affected (0.36 sec)".

I signed up to PopSQL and created a new connection for my database. I used an arbitrary nickname, "localhost" for hostname, 3306 for port number, the correct database name, root for username and the correct password. When I tested this connection I received the error: Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2).

I've been searching online for solutions, and tried using 127.0.0.1 as hostname instead. After testing again I received the error: Can't connect to MySQL server on '127.0.0.1' (115). Additionally, I searched through the 'MySQL Server 8.0' folder and couldn't find a .sock file anywhere in any of the folders inside. Does anyone know what could be wrong?

Jalexander
  • 29
  • 1
  • 2

4 Answers4

3

'Connect directly from my computer' worked for me

makrbec
  • 31
  • 2
2

Under "Share this connection with teamates..." I had to change to "No Keep it private" and then it worked for me.

Shehnaz S
  • 21
  • 2
1

Click on Manage connections as in the following picture:

Manage connections

Scroll down and go to SHARE THIS CONNECTION WITH TEAMMATES AT. Then in the drop down menu, select keep it private.

Toni
  • 1,555
  • 4
  • 15
  • 23
-1

I was having the same issue and I changed "Share this connection with teammates" from "Yes, including credentials" to "No, keep it private" and then it worked.

Ugochukwu
  • 1
  • 1