-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting
Alana Darcher edited this page Jun 22, 2020
·
21 revisions
Depending on the error, a couple things could be wrong. Most commonly, the issue is that mysql is not running in the background and thus can't be logged into.
Fix: https://www.tecmint.com/fix-error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111/
Summary:
- If
ps -Af | grep mysqld
only returns an entry with the user name and not withmysql
, mysql is not running and needs to be started. Try running:sudo systemctl start mysql.service
and/orsudo service mysqld start
- Check again by running
ps -Af | grep mysqld
- Get the port information for where mysql is running by:
sudo netstat -lnp | grep mysql
(default is 3306) - Try logging into mysql again using that port:
mysql -h 127.0.0.1 -u root -P <port>
(replacing with the number given in the previous step)