LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-31-2012, 01:39 AM   #1
said76
Member
 
Registered: Aug 2011
Posts: 95

Rep: Reputation: Disabled
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
 
Old 07-31-2012, 01:57 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,103

Rep: Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102
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.
 
Old 07-31-2012, 03:31 AM   #3
MCD555
Member
 
Registered: May 2009
Location: Milan, Italy
Distribution: Ubuntu, Debian, Fedora, Oracle Linux
Posts: 106

Rep: Reputation: 9
Quote:
Originally Posted by evo2 View Post
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!
 
Old 08-01-2012, 12:08 AM   #4
said76
Member
 
Registered: Aug 2011
Posts: 95

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is mysql automatically logging me in without .my.cnf or my.cnf sections? alunduil Linux - Server 11 05-19-2010 11:52 AM
cpan> locate -u Unknown shell command 'locate -u'. Type ? for help. sharad2005 Linux From Scratch 1 08-04-2006 12:40 AM
My.cnf Maxman Linux - General 4 10-28-2005 07:52 AM
my.cnf mnauta Linux - General 2 02-06-2004 11:31 AM
my.cnf doodah Linux - General 2 05-31-2001 09:45 AM


All times are GMT -5. The time now is 11:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration