0

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 was searching for solution of the error.Error Solution

I tried to connect directly from my computer, but, it's showing error: Access denied for user 'abhishek'@'localhost' (using password: YES)

Can anyone help? Thanks in advance

  • Are you trying to connect from a machine that is in different network (eg. through the internet)? if yes, that's the problem - this user only accepts local connections. If not, the given username/password is incorrect. I guess there are no other possibilities. – Flash Thunder Nov 01 '21 at 09:59
  • But, without an Internet connection, PopSQL is not working – Abhishek Pal Nov 01 '21 at 11:14
  • If you run `mysql -u root -p` in CLI, what happens? – Lajos Arpad Nov 01 '21 at 11:19
  • @AbhishekPal it's not about intenet connection, but if the connection is remote or local ... if the user is `'abhishek'@'localhost'`, user `'abhishek'` can only connect from local network, not remote – Flash Thunder Nov 01 '21 at 14:49
  • @FlashThunder How do i check if the connection is remote or local – Abhishek Pal Nov 03 '21 at 05:52

2 Answers2

2

I founded my answer by typing correct username and password.

I typed root for username and password that I already setted localhost has the host and 3306 has the port. database name should be the same you created earlier.

Elikill58
  • 4,050
  • 24
  • 23
  • 45
  • 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 07 '22 at 16:16
0

If someone still with that problem, i think you can soved that problem, select the option "Connection type", because if you try to take the test without selecting that option, the POP.SQL might be thinking that you want to make a connection cloud.