Questions tagged [mysql-error-2002]

Can't connect to local MySQL server through socket

Can't connect to local MySQL server through socket

54 questions
0
votes
1 answer

Can't connect to local MySQL server and lost root password

I can't connect to a MySQL server, so I stopped MySQL with: sudo /etc/init.d/mysql stop # Stopping mysql (via systemctl): mysql.service. Then, login with root and start MySQL again: sudo -s mysqld_safe --skip-grant-tables & # .... mysqld_safe…
Y.H.
  • 1
  • 2
0
votes
1 answer

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' in ubuntu 18.04 LTS

when i run the command mysql -u root -p i get the following error message: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' i have checked out some solution from related articles but…
0
votes
1 answer

Cant run php/mysql script on terminal

Im having the hardest time with this. Im doing a simple select statement in php through terminal. I can run this script in my browser by refreshing the page just fine. But when i type php test.php on the terminal, it returns Warning:…
Ben
  • 1,173
  • 2
  • 13
  • 17
0
votes
1 answer

can't connect to mysql in Opensuse 10.2

I have problem with mysql I've installed the mysql in YAST but when in console I type this one: mysql -u root it tells me: Error 2002: Can't connect to local mysql server through socket '/var/lib/mysql/mysql.sock'
Nickool
  • 3,414
  • 10
  • 39
  • 68
0
votes
1 answer

Error 2002 when running mysql (with sudo as well)

I'm trying to use MySQL to make a login system and I keep getting this error. winfinity@pcname:~$ mysql ERROR 2002 (HY000): can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I've tried multiple answers. Can…
Winfinity
  • 1
  • 3
0
votes
0 answers

PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] on heavy query

- I checked the similar questions associated but they don't have to do with my problem and none of the answers solve my problem - I have php script executing a mysql select query to export the database in a xls file, it works fine on my test…
Michele
  • 21
  • 5
0
votes
2 answers

Errors while trying to upgrade MySQL server from 5.7 to 8.0 on Ubuntu 18.04

I don't know if I am not doing something correctly or if some flaw is occurring that I can't see. Below are the steps I am taking to try to set up the server but I must be missing something. 1)Add APT repository: $ wget…
0
votes
0 answers

mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)" when trying to connect

I'm trying to export my wordpress database with php wp-cli.phar db export but I get this error mysqldump: Got error: 2002: "Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)" when trying to connect After looking for…
0
votes
0 answers

innodb crashed with error number 5 and mysql wont start

hello my database stop today and dont start again. 2019-12-10 10:08:02 26295 [Note] InnoDB: Completed initialization of buffer pool 2019-12-10 10:08:03 26295 [ERROR] InnoDB: Error in system call pread(). The operating system error number is…
Armin
  • 61
  • 1
  • 8
0
votes
1 answer

Can't start mysql server after updating Ubuntu 18.4

first i have tried to uninstall both of them root@thaali:/etc/mysql# sudo apt-get remove --purge mysql* Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package mysql.cnf E: Couldn't…
0
votes
1 answer

mysql_secure_installation ERROR 2002 Can't connect to local MySQL server

After installing Mariadb on Debian 9, I am trying to run /usr/bin/mysql_secure_installation. The script starts okay, but after I press 'enter' for no root password, I get the following error: ERROR 2002 (HY000): Can't connect to local MySQL server…
Barb H.
  • 51
  • 1
  • 6
0
votes
0 answers

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) after reinstalling mySQL twice

Login attempts and Error messages I have included an image which shows all the login attempts i made including -h localhost and -h 127.0.0.1. I have even checked for space issues and haven't had any issues regarding that. I was able to access the…
0
votes
1 answer

Can't connect to MySQL server on 'localhost' (10061) (mainly remote connections)

Good day, firstly I'd like to sorry for my English. after installing latest WAMP I have problem with access to my MySQL server from remote machines in my LAN. It looks like it refuse tcp connections (before adding bind-address telnet localhost 3306…
0
votes
1 answer

Mysql Xampp #2002 error

Unbelievable after everything that I have tried it still doesn't work! I have deleted the ibdata and still they keep coming up! I don't know what to do, please help!
Demotivated
  • 107
  • 2
  • 12
0
votes
1 answer

Mac Terminal/ MySQL configuration issues | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I've been getting this error when trying to navigate to MySQL in the command prompt. System Preferences shows it's running through port 3306. I'm new to programming and I'm just trying to keep up with tutorials, but a lot of this knowledge is…
Nico Daunt
  • 11
  • 1