3

I am new to using SQL and MySQL. I recently installed MySQL Server 8.0.27 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 database name;'. This seemed to work as below it read "Query OK, 1 row affected (1.82 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. Please help me with this :)

Akash Gupta
  • 31
  • 1
  • 1
  • 2

5 Answers5

3

1.Select 'Connect directly from my computer' button option.

2.Put username to root.

Rishan
  • 41
  • 4
1

Im new to SQL, and I had a similar problem to you. I was able to fix it by going to preference > connections > managing connection > advance options: selecting Connect directly from my computer PopSQL servers won't have access to your database. This method worked for me.

0

I had the same error with popsql and when i changed my username to root everything worked. Also make sure you enter your database name (the one you create from mysql command line client) correctly .

fehim
  • 5
  • 3
0

I solved the same error just by restarting my PC*.

*It was a fresh install of both PopSQL and MySQL Server so perhaps it was due to that.

Mil
  • 1
0

I just set every name as root and it works for me see this image

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 13 '22 at 07:21