Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 03: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, 05:59 PM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,890

Rep: Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608Reputation: 1608
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, 07: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 08:32 PM.
Old 06-19-2009, 12:10 AM   #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 12:46 PM
MySQL startup process and my.cnf lord-fu *BSD 4 07-11-2007 08:44 AM
Setting up the my.cnf for MySQL Server wbuik Linux - Software 1 09-24-2005 05:33 PM
how to config the mysql my.cnf? treotan Linux - General 1 09-14-2005 12:05 PM
MySQL server & my.cnf hct224 Linux - Newbie 0 04-02-2004 02:03 PM > Forums > Linux Forums > Linux - General

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