trying to install mysql but I cannot start the service and cannot locate mysqld.sock
I’m trying to install mysql but I cannot start the service and cannot locate mysqld.sock
I am following the how to here: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
And get stuck trying to run
I get this error:
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Checking the version does show it installed.
mysql --version mysql Ver 8.0.21-0ubuntu0.20.04.4 for Linux on x86_64 ((Ubuntu))
I am unable to locate the mysqld.sock file anywhere and there is also no mysqld dir in /var/run/
I’ve also been through this troubleshooting doc https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-socket-errors-in-mysql
But I can’t start the mysql service and there is nothing in the mysql.cnf file other than this
# The MySQL database client configuration file # # Ref to https://dev.mysql.com/doc/refman/en/mysql-command-options.html [mysql]
This is what mysql.service shows
systemctl status mysql.service ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (start) since Thu 2020-09-10 14:31:23 UTC; 15s ago Process: 8847 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 8855 (mysqld) Status: "Server startup in progress" Tasks: 4 (limit: 533) Memory: 2.5M CGroup: /system.slice/mysql.service └─8855 [mysqld]
If I run it again the Process / Main PID changes. Does that mean it’s just taking a while to complete and I need to be patient?
I’ve uninstalled mysql a few different times but can’t seem to get it sorted.
Any help appreciated.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×