LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   can't locate my.cnf under /etc (https://www.linuxquestions.org/questions/linux-server-73/cant-locate-my-cnf-under-etc-4175419491/)

said76 07-31-2012 01:39 AM

can't locate my.cnf under /etc
 
Hi,

I have got a very strange case here and am wondering if anyone might be able to help me.

I have installed MySQL-5.1.63 on my Ubuntu Server 12.04 LTS. When I was about to start it by using the start-up script - mysql.server under /etc/init.d

I got an error saying "MySQL Manager or server PID file could not be found!"

Then, I quickly checked for my my.cnf file which resides at /etc. I have other my.cnf file which has been renamed to /etc/mysql/my.cnf.orig.

But what puzzles me is that when I run "$ locate" command, it returned a list but there is no /etc/my.cnf there. How could this happen? I can edit and save the /etc/my.cnf file with no problem. But wonder why it is not able to locate /etc/my.cnf but others. I have restarted the server for several times but still no luck.

I wonder what else I could try to fix this issue

Any help would be greatly appreciated.

Thank you

evo2 07-31-2012 01:57 AM

Hi,

the locate database only updates periodically (usually as a daily cron job), so you should not expect locate to know about "new" files.

Also, what method did you use to install mysql? I think that mysql server package from the Ubuntu repos would expect my.cnf to be at /etc/mysql/my.cnf, not /etc/my.cnf (you should be able to check the startup script to confirm).

Evo2.

MCD555 07-31-2012 03:31 AM

Quote:

Originally Posted by evo2 (Post 4741904)
Hi,

the locate database only updates periodically (usually as a daily cron job), so you should not expect locate to know about "new" files.

Evo2.

To "force" the update for the locate db just run updatedb command

Code:

sudo updatedb
Once done you'll get the locate results you need!

Hope this helps!

said76 08-01-2012 12:08 AM

Thank you all experts for your replies.

For it works now. Yes, I can see it now in the list when running "locate" command. Another day another new thing to learn. Thanks a lot


All times are GMT -5. The time now is 09:40 AM.