Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Why MySQL daemon (Red Hat Linux Pro 7.3) stops right away after it starts?

Posted on 2003-03-13
9
Medium Priority
?
504 Views
Last Modified: 2012-05-05
Hi,

I tried to start MySQL daemoon on Red Hat Linux Pro 7.3 (already updated with the latest updates and fixes). I've also checked to be sure
-- that a group: mysql and a unique user: mysql are already created for MySQL
-- that all necessary RPM packages already installed correctly
-- that in the file ld.so.conf, a line to specify the lib of MySQL already exists (/usr/lib/mysql)
I already run the command mysql_install_db to create MySQL tables successfully
However, when I started MySQL with the command: safe_mysqld --user=mysql &, the daemon started and then ended right away. The logs are something like this:

.... Starting mysql daemon from the database /var/lib/mysql.
.... mysql daemon ended.

 I already checkec to see if a mysql process is alive with
ps -ef | grep mysqld
but I cannot see any process of mysql. I read into many books and different articles on webs but I couldn't find anything that can help me to solve this yet. One thing is this: in all the books and articles, they always mentioned the approach of installing MySQL by myself into /usr/local/mysql. In my case, I install Red Hat Linux Pro 7.3 and then update it. So all the packages are already installed and there is no central directory for MySQL like discussed in books and articles. For example, exec. programs like mysql_install_db is in /usr/bin where others programs also exist.

Please give some help by showing me how to successfully start MySQL daemon on Red Hat Linux Pro 7.3 (using the packages already installed. I don't want to remove MySQL and then re-installed it). You can give me a bonus if you explain to me why this situation occurs.

Thanks a lot

rfr1tz

0
Comment
Question by:rfr1tz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
9 Comments
 
LVL 15

Accepted Solution

by:
VGR earned 800 total points
ID: 8131962
what is in my.err file ?
0
 
LVL 3

Author Comment

by:rfr1tz
ID: 8134236
Hi VGR,

I've found out how to start and stop mysqld daemon on Red Hat Linux Pro 7.3. I should use /etc/init.d/mysqld start & .../mysqld stop to start and stop this daemon. I believe safe_mysqld should be better in some situation. However, I've tried these commands and they work.  By either way, thanks a lot for your reply.

Regards,

nlthuan_tx
0
 
LVL 15

Expert Comment

by:VGR
ID: 8134549
hum, that's true but unusual.
"safe_mysqld [&]" is (AFAIK) the best solution, and if it fails, "mysqld start" should fail too :D
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 8

Expert Comment

by:heskyttberg
ID: 8139443
Hi!

VGR: some info

safe_mysqld might not be what you think in redhat it's not a runnable daemon it's a script.

The /etc/init.d/mysqld is also a script for start/stop/restart/status and so on.

/etc/init.d/mysqld calls the safe_mysqld script, but since it is a script you need correct parameters to use it directly and the actual mysqld binary is not in any of the sbin/bin directories.

That is the reason why you cannot start the mysqld daemon directly at least not with any ease. You should always use the start/stop scripts for services in redhat.

Regards
/Hans - Erik Skyttberg
0
 
LVL 15

Expert Comment

by:VGR
ID: 8139518
I know, I've some RH machines myself
What did I write that triggered your fury ?
0
 
LVL 8

Expert Comment

by:heskyttberg
ID: 8140494
Hi!

no fury, just didn't think you knew that since you wrote this: "safe_mysqld [&]" is (AFAIK) the best solution, and if it fails, "mysqld start" should fail too.

This isn't true on a RH system, so I just assumed you didn't know that.

Regards
/Hans - Erik Skyttberg
0
 
LVL 3

Author Comment

by:rfr1tz
ID: 8366907
200 points for just reading that long question! Thanks for your help.
0
 
LVL 15

Expert Comment

by:VGR
ID: 8367417
well, AFAIK if "mysqld start" fails, "safe_mysqld &" will fail too as the latter employs the first, on a RH system.
0
 
LVL 15

Expert Comment

by:VGR
ID: 8367418
well, AFAIK if "mysqld start" fails, "safe_mysqld &" will fail too as the latter employs the first, on a RH system.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question