LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem initialising MySQL Daemon (https://www.linuxquestions.org/questions/linux-newbie-8/problem-initialising-mysql-daemon-4175419078/)

mccabec123 07-28-2012 09:26 AM

Problem initialising MySQL Daemon
 
Hey guys, I'm new to the forums here but I hope to become more active as I've recently purchased a dedicated server and I'm running Fedora off of it so it's a constant learning process, I'm fairly average at BASH, but I know enough to make my way around, I'm a software developer to trade more than a network techi. Which leads me to my initial problem, I'm having an issue starting my MySQL daemon after rebooting my dedi, I have no clue why it's suddenly doing this, I'm running PHPMyAdmin from the server and also issuing certain commands through the CLI for MySQL, but after rebooting I'm getting this error everytime I try to start the instance of the daemon:

Code:

[root@ks23085 ~]# service mysqld start
Redirecting to /bin/systemctl  start mysqld.service
[root@ks23085 ~]# systemctl mysqld start
Unknown operation mysqld
[root@ks23085 ~]# systemctl start mysqld
Failed to issue method call: Unit name mysqld is not valid.
[root@ks23085 ~]# systemctl start mysqld.service
[root@ks23085 ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/path/to/mysql.sock' (2)

It's completely bizarre as it was working perfectly before I rebooted it, I didn't update it or change the install, the only thing that I did do was install postfix, but I don't see why that would cause any issues with MySQL :S

I really need a hand on this one, I've tried several solutions from google with no results whatsoever. Thanks in advance guys.

mindsport 07-28-2012 09:39 AM

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/path/to/mysql.sock' (2)
you need to edit /etc/my.cnf or /etc/mysql/my.cnf wherever your my.cnf is located, look for socket = /path/to/mysql.sock and change it to socket = /var/run/mysqld.sock or somewhere that exists! and restart the daemon, hope this helps

rch1231 07-28-2012 10:37 AM

systemctl
 
Hello,

I think the thing you are also looking for is to automatically start the server on boot.
In order to get the daemon to start automatically when the system starts you use:

systemctl enable mysqld.service

mccabec123 07-28-2012 10:43 AM

Quote:

Originally Posted by rch1231 (Post 4740054)
Hello,

I think the thing you are also looking for is to automatically start the server on boot.
In order to get the daemon to start automatically when the system starts you use:

systemctl enable mysqld.service

Yeh, I've changed the 'my.cnf' file already, but for some reason it's still showing the same location for the socket :S I don't know how to restart the mysql instance, I've tried 'systemctl restart mysqld.service', cause I thought it might need to reload the 'my.cnf' file. But I don't know, any ideas?


All times are GMT -5. The time now is 06:07 PM.