LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 01-28-2009, 12:03 PM   #1
rsatya
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
I have RHEL 5.0 and MySQL start problem, my MySQL server doesn't start


My MySQL server in RHEL5.0 is running only when I gave chmod 777 my.cnf.

my data dir = /var/lib/mysql owner root, group root.
my.cnf owner root, group root.

where I have to change/configure ?
 
Old 01-28-2009, 02:13 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by rsatya View Post
My MySQL server in RHEL5.0 is running only when I gave chmod 777 my.cnf.

my data dir = /var/lib/mysql owner root, group root.
my.cnf owner root, group root.

where I have to change/configure ?
You need to give the mysql user access to that directory....

first find out what user mysql runs as (usually mysql...you can find out in the /etc/init.d/mysql file).

Then
Code:
root@host# chmod 770 /var/lib/mysql
root@host# chown mysql:mysql /var/lib/mysql
-C
 
Old 02-02-2009, 04:22 AM   #3
rsatya
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
custangro:

I have as you specified for the user. Now my /var/lib/mysql own:group are mysql mysql and chmod are 770.

my my.cnf is root:root , even though it didn't started. Still I need to give 777 to /etc/my.cnf.

then when I start using command

service mysql start it gives this message

warning:World-writable config file '/etc/my.cnf' is ignored
Starting MySQL [ok]
 
Old 02-02-2009, 10:28 AM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by rsatya View Post
custangro:

I have as you specified for the user. Now my /var/lib/mysql own:group are mysql mysql and chmod are 770.

my my.cnf is root:root , even though it didn't started. Still I need to give 777 to /etc/my.cnf.

then when I start using command

service mysql start it gives this message

warning:World-writable config file '/etc/my.cnf' is ignored
Starting MySQL [ok]
Try this...
Code:
root@host# chmod -R 770 /var/lib/mysql
root@host# chown -R mysql:mysql /var/lib/mysql
root@host# service mysql stop
root@host# service mysql start
-C
 
Old 02-03-2009, 12:04 PM   #5
jonesr
Member
 
Registered: Feb 2008
Location: Sacramento
Distribution: RHEL AS, mostly
Posts: 44

Rep: Reputation: 18
Quote:
Originally Posted by rsatya View Post
warning:World-writable config file '/etc/my.cnf' is ignored
Starting MySQL [ok]
For security, MySQL wants the configuration file owned by the user that will be running the code and not writable by other users.

First, grep chown /etc/init.d/mysqld to see what the system expects, then use that same form of chown on /etc/my.cnf.

Second, chmod 644 /etc/my.cnf so the file is readable by anyone but only writable by the user that will be running the daemon.
 
  


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
MySQL problem - server cannot start duffmckagan Debian 3 05-30-2007 04:18 AM
can't start mysql server vito_huang Linux - Server 1 03-10-2007 07:36 AM
how do I start mysql server? barrythai SUSE / openSUSE 4 04-05-2006 05:46 PM
mysql server does not start up prasanta Linux - Newbie 2 01-05-2006 01:07 PM
Trying to start Mysql server number11 Linux - Newbie 3 06-06-2005 01:59 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 12:58 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