?
Solved

What is the difference between starting mysql via chkconfig and mysqld_safe?

Posted on 2009-07-10
1
Medium Priority
?
1,099 Views
Last Modified: 2012-05-07
Hi,

I am noticing mysqld spontaneously stopping after a few minutes without logging any errors when i start it via $ service mysqld start. When I start it via $ mysqld_safe --user=mysql it seems to run fine. I noticed in /etc/init.d/mysql that this:

get_mysql_option mysqld datadir "/var/lib/mysql"

This is not the location of my datadir. Is this the problem? Do I need to customize the init script? Why isn't this init script using my values from /etc/my.cnf?

Thanks
0
Comment
Question by:tomp_gl
[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
1 Comment
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 2000 total points
ID: 24832502
mysqld_safe AFAIK is the recommended way to start MySQL instance on Netware and according to manual it is so for Linux: http://dev.mysql.com/doc/refman/5.1/en/mysqld-safe.html.

However, you are starting mysql should read the my.cnf file; however, any options specified as arguments to the start command will override what is the in the cnf file.  Therefore, the datadir "/var/lib/mysql" is overriding the correct value that is in your my.cnf.

Try changing to this:
get_mysql_option mysqld

And see if you have the same issues.  That is most likely the issue if that directory is invalid.  The fact that you are not starting with mysqld_safe is why you are not getting log of error causing the shutdown.  Moreover, if you note in your $ mysqld_safe --user=mysql method of starting datadir is not specified.  If you tried $ mysqld_safe --user=mysql --datadir="/var/lib/mysql" you may get the same symptom.

Regards,
Kevin
0

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

801 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