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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-22-2007, 12:13 AM
|
#1
|
LQ Newbie
Registered: Oct 2007
Posts: 5
Rep:
|
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
|
|
|
10-22-2007, 05:45 PM
|
#2
|
Senior Member
Registered: Dec 2004
Posts: 1,056
Rep:
|
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'
|
|
|
10-23-2007, 01:11 AM
|
#3
|
LQ Newbie
Registered: Oct 2007
Posts: 5
Original Poster
Rep:
|
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
|
|
|
10-23-2007, 02:11 AM
|
#4
|
Senior Member
Registered: Dec 2004
Posts: 1,056
Rep:
|
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.
|
|
|
10-23-2007, 03:52 AM
|
#5
|
LQ Newbie
Registered: Oct 2007
Posts: 5
Original Poster
Rep:
|
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
|
|
|
10-23-2007, 05:09 AM
|
#6
|
LQ Newbie
Registered: Oct 2007
Posts: 5
Original Poster
Rep:
|
Hi Sneakyimp,
Thank you very much for your valuable suggestion.Now mysql is getting started successfully.
Thank you
Best Regards
Kamakshi
|
|
|
10-23-2007, 11:33 AM
|
#7
|
Senior Member
Registered: Dec 2004
Posts: 1,056
Rep:
|
Glad to help!
|
|
|
All times are GMT -5. The time now is 02:58 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|