LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2012, 09:26 AM   #1
mccabec123
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 07-28-2012, 09:39 AM   #2
mindsport
Member
 
Registered: Apr 2005
Location: Florida
Distribution: Slackware 13.1-64bit / 2.6.33.4
Posts: 46

Rep: Reputation: 17
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
 
Old 07-28-2012, 10:37 AM   #3
rch1231
Member
 
Registered: Mar 2007
Location: Bedford, Texas
Posts: 31

Rep: Reputation: 15
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
 
Old 07-28-2012, 10:43 AM   #4
mccabec123
LQ Newbie
 
Registered: Jul 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rch1231 View Post
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem starting mysql daemon linuxandtsm Linux - Newbie 3 04-05-2012 01:32 PM
[SOLVED] MySQL Daemon failed to start - no mysql.sock file jastanle84 Linux - Software 9 10-10-2011 02:54 PM
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 06:23 AM
MySQL - Timeout error occurred trying to start MySQL Daemon. stuartornum Linux - Software 3 02-26-2006 12:54 PM
problem with user initialising script pato Linux - General 1 03-03-2004 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration