LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mysql error (https://www.linuxquestions.org/questions/linux-newbie-8/mysql-error-920287/)

jackssyntrio 12-23-2011 10:10 PM

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

aazkan 12-23-2011 11:12 PM

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?

jackssyntrio 12-23-2011 11:20 PM

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

aazkan 12-24-2011 07:23 AM

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.


All times are GMT -5. The time now is 04:31 AM.