LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-23-2011, 11:10 PM   #1
jackssyntrio
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Rep: Reputation: Disabled
Mysql error


I have installed mysql via source code installtion, When i tried to start the service its giving error

[root@jacks tmp]# /usr/local/mysql/bin/mysqld start
111223 23:08:58 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
111223 23:08:58 [ERROR] Aborting
111223 23:08:58 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete


[root@jacks mysql]# ./bin/mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)


anyone plz help me at the earlist
 
Old 12-24-2011, 12:12 AM   #2
aazkan
Member
 
Registered: Jan 2008
Posts: 72

Rep: Reputation: 5
Basically mysql is complaining you're running mysql as root user and refuse to start.
I'd suggest you create user+group mysql, change your my.cnf so mysql runs as as user+group mysql. Alternatively, most distro has their own package manager which you could use to install mysql. That should put the reuqired configs/rights/user etc. in.

What's your distro by the way?
 
Old 12-24-2011, 12:20 AM   #3
jackssyntrio
LQ Newbie
 
Registered: Dec 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
CentOS release 5.7 (Final)
i686

Dear aazkan,
I have made all necessary owership and group
cd /usr/local/mysql
chown -R mysql
chgrp -R mysql
chown -R root .
chown -R mysql data
 
Old 12-24-2011, 08:23 AM   #4
aazkan
Member
 
Registered: Jan 2008
Posts: 72

Rep: Reputation: 5
Hi,

If it's CentOS, a

Code:
yum install mysql mysql-server
ought to do it but you wont be getting the lastest mysql. CentOS uses slightly old stable version with backported patches.

Try

Code:
chown -R mysql: /usr/local/mysql
if this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 02:52 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Software 3 06-28-2007 12:46 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 04:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration