Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-18-2009, 02:13 PM   #1
Registered: Jun 2009
Posts: 42

Rep: Reputation: 16
Missing my.cnf after installing mysql 5.1.35


I installed mysql version 5.1.35 on centos 5.3. These are fresh installation.

I am not able to locate my.cnf file on /etc directory. I want to be able to change the location of data location (changed the default).

Any help would be appreciated.

Btw, I did the yum update before installing mysql.

Old 06-18-2009, 04:59 PM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,180

Rep: Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392Reputation: 1392
How did you install it?
You should use your package manager (yum) to install both mysql and mysql-server. I think /etc/my.cnf is available by the client mysql package. Or you can find under /usr/share/mysql configuration files for various needs, so you can copy the one that fits your needs under /etc/my.cnf.

If you used the binary from you can find under /<install-dir>/mysql/support-files also various .cnf to choose the one that matches your needs.
Old 06-18-2009, 06:31 PM   #3
Registered: Jun 2009
Posts: 42

Original Poster
Rep: Reputation: 16
I installed both the server and client.

I went into /usr/share/mysql and copied one of the .cnf files (my-small.cnf) to the etc calling it my.cnf.

I also move all the files from /var/lib/mysql to my new directory.

Edited the my.cnf file with no luck.

Starting MySQL.Manager of pid-file quit without updating file.[FAILED]

The new directory has all the rights.

Edit: I used the rpm package from What would the command to install mysql from yum?


Last edited by jdnow09; 06-18-2009 at 07:32 PM.
Old 06-18-2009, 11:10 PM   #4
Registered: Jun 2009
Posts: 42

Original Poster
Rep: Reputation: 16
i finally went with --> 'yum install mysql-server' and it worked. Mysql version is a little older.

I modified the my.cnf and move all the databases over to the new location.

I did run into another problem. If i enforce "selinux", mysqld won't start. Any idea how it can fix this?

I will post another thread for this problem.



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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
change to config file MySQL my.cnf does not take nephish Linux - Server 2 09-27-2008 11:46 AM
MySQL startup process and my.cnf lord-fu *BSD 4 07-11-2007 07:44 AM
Setting up the my.cnf for MySQL Server wbuik Linux - Software 1 09-24-2005 04:33 PM
how to config the mysql my.cnf? treotan Linux - General 1 09-14-2005 11:05 AM
MySQL server & my.cnf hct224 Linux - Newbie 0 04-02-2004 01:03 PM

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

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