Answers for "ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)"

SQL
11

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

sudo chown -R _mysql:mysql /usr/local/var/mysql

sudo mysql.server start
Posted by: Guest on May-12-2020
4

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.s

> ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
> 
> service mysql start or service mysql start
Posted by: Guest on June-04-2020
1

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

sudo apt-get install mysql-server
Posted by: Guest on October-10-2020
1

ERROR 2002 (HY000): Can

# This is usually caused by the fact that the
# MySQL Server isn't even running
# On Windows, check your services, if its not running
# start it, or install and start it.

# On *nix, for this example Debian based
# Firstly see if it's even running
ps aux | grep mysql

# If you dont see any process other than your grep call,
# It's not running

# Assuming you have mysql-server installed
# Start it
sudo /etc/init.d/mysql start

# Otherwise install it, configure and start it up as above
sudo apt-get install mysql-server

# Goodbye 2002
Posted by: Guest on February-21-2020
0

SQLSTATE[HY000] [2002] No connection error

$conn = new PDO("mysql:host=$servername;port=8889;dbname=AppDatabase", $username, $password);
Posted by: Guest on October-15-2021

Code answers related to "ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (115)"

Code answers related to "SQL"

Browse Popular Code Answers by Language