Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-28-2009, 12:03 PM
|
#1
|
LQ Newbie
Registered: Jan 2009
Posts: 2
Rep:
|
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 ?
|
|
|
01-28-2009, 02:13 PM
|
#2
|
Senior Member
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
|
Quote:
Originally Posted by rsatya
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
|
|
|
02-02-2009, 04:22 AM
|
#3
|
LQ Newbie
Registered: Jan 2009
Posts: 2
Original Poster
Rep:
|
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]
|
|
|
02-02-2009, 10:28 AM
|
#4
|
Senior Member
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
|
Quote:
Originally Posted by rsatya
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
|
|
|
02-03-2009, 12:04 PM
|
#5
|
Member
Registered: Feb 2008
Location: Sacramento
Distribution: RHEL AS, mostly
Posts: 44
Rep:
|
Quote:
Originally Posted by rsatya
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.
|
|
|
All times are GMT -5. The time now is 08:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|