LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2007, 12:13 AM   #1
kamakshiganesh
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Rep: Reputation: 0
Problem in starting.


Hi,

Good Morning!!

I am using mysql database in linux for more than one month,it works fine but today i experienced a problem as stated below.

I tried starting mysql from /usr/local, the location where i installed mysql

but after executing this command " bin/mysqld_safe --user=mysql &"

Its coming like mysql is starting from /var/lib/mysql, which i never mentioned

and message coming like "STOPPING server from pid file /var/run/mysqld/mysqld.pid"

But there is no directory named mysqld or file mysqld.pid in /var/run location.

I have installed some rpms from the website for skype installation, i think this problem starts after the installation of those rpms.

I request your immediate help in resolving this issue.

Terminal output for your reference :

[root@localhost ~]# cd /usr/local
[root@localhost local]# cd mysql1
[root@localhost mysql1]# bin/mysqld_safe --user=mysql &
[1] 3485
[root@localhost mysql1]# Starting mysqld daemon with databases from /var/lib/mysql
STOPPING server from pid file /var/run/mysqld/mysqld.pid
071022 10:02:31 mysqld ended

Thank you
Best Regards
Kamakshi
 
Old 10-22-2007, 05:45 PM   #2
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
when mysql runs, it is likely that it creates a PID file in order to store the process ID of the mysql daemon process that starts. The location of this PID file is determined by mysql config and has nothing to do with the command you use to start mysql. MySQL doesn't really run 'in a directory' but rather runs as a daemon process which listens for connections on a particular port.

it may be that mysql is already running when you try to run that command and mysql attempts to end the running process before restarting--or not...i'm not really sure as I'm not a total expert on this matter.. Perhaps try this command before trying to start mysql? It should tell you if the mysql daemon is already running or not:
Code:
ps -aux | grep 'mysql'
 
Old 10-23-2007, 01:11 AM   #3
kamakshiganesh
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,

Thank you for your reply.

When i run this command in terminal.Its coming like

[root@localhost mysql1]# ps -aux | grep 'mysql'
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 5209 0.0 0.0 60232 700 pts/1 S+ 11:31 0:00 grep mysql
[root@localhost mysql1]#

Please guide me further.

Thanks and regards
Kamakshi
 
Old 10-23-2007, 02:11 AM   #4
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
You might want to check the mysql log. On my machine it's located at /var/log/mysqld.log. You could try something like this:
Code:
tail /var/log/mysqld.log
or you could run this in one window
Code:
tail -f /var/log/mysqld.log
and then try to start mysql in the other.

if the file /var/run/mysqld/mysqld.pid doesn't exist, then mysql was probably not able to start up because it could not create that file. It could be a permissions problem or something? I'm not really sure.
 
Old 10-23-2007, 03:52 AM   #5
kamakshiganesh
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Hi,

Thank you very much for your timely response.

I executed the tail command "tail -f /var/log/mysqld.log"as you said, the terminal displays like

[root@localhost ~]# tail -f /var/log/mysqld.log

071022 10:12:43 mysqld started
071022 10:12:43 [ERROR] Fatal error: Can't change to run as user 'mysql1' ; Please check that the user exists!

071022 10:12:43 [ERROR] Aborting

071022 10:12:43 [Note] /usr/local/mysql1/bin/mysqld: Shutdown complete

071022 10:12:43 mysqld ended


I checked the mysqld.log file...

It contains the text like

071019 18:13:40 InnoDB: Started; log sequence number 0 0
071019 18:13:40 [ERROR] /usr/local/mysql1/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
071019 18:13:40 [ERROR] Can't start server: can't create PID file: No such file or directory
071019 18:13:40 mysqld ended

Can u guide me what need to be done to proceed further.

Thank you
Best Regards
Kamakshi
 
Old 10-23-2007, 05:09 AM   #6
kamakshiganesh
LQ Newbie
 
Registered: Oct 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Hi Sneakyimp,

Thank you very much for your valuable suggestion.Now mysql is getting started successfully.

Thank you
Best Regards
Kamakshi
 
Old 10-23-2007, 11:33 AM   #7
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
Glad to help!
 
  


Reply



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
Problem starting X thearchitect Linux - Software 2 10-18-2009 06:44 PM
Problem starting X bobsacamano Slackware 11 10-23-2005 06:53 PM
problem starting x thearchitect Ubuntu 1 10-09-2005 08:08 PM
Problem starting X alexklant Slackware 5 04-02-2005 04:41 AM
a problem with starting x sometimes php Linux - General 2 07-12-2002 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration