

MySQL Tip - How do you shut down mysql when you don't use upstart or init.d
source link: https://fuzzyblog.io/blog/mysql/2014/08/27/mysql-tip-how-do-you-shut-down-mysql-when-you-don-t-use-upstart-or-init-d.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

MySQL Tip - How do you shut down mysql when you don't use upstart or init.d
Aug 27, 2014
When you find yourself uttering statements like:
That mysql tip is from Peter Zaitsev. I'll follow it because I trust him.
And you actually know who Peter is – without having to look him up – then perhaps you've gone too far down the MySQL rabbit hole. But anyway… MySQL is normally started from either an init.d script or an upstart routine like this:
- sudo /etc/init.d/mysql start
- sudo service mysql start
And if you need to shut mysql down then you use the corresponding:
- sudo /etc/init.d/mysql stop
- sudo service mysql start
Now both of these are actually just a front end to mysqld_safe which is a shell script supplied by MySQL which handles running the executable, pid file and such. Its an old school Linux / Unix approach to life and it works great.
Now when MySQL is having problems starting up like, for example, you moved a database from Connecticut to Indianapolis via copying a mysql cold backup (directly copying the innodb files) and you got the number of log files wrong in my.cnf or innodb.cnf then you'll find that if you start mysql thru upstart or init.d, you may not get error messages since they get "lost" at the level between the mysqld_safe script and init.d / upstart. In this case then you can run mysqld_safe directly like this:
- sudo /usr/local/mysql/bin/mysqld_safe
Now the problem that raises is that once you finally get it going, you will NOT have a stop command. In that case you can use:
- mysqladmin shutdown
Recommend
-
11
Ansible Tutorial 02 - Configuring a Sidekiq Upstart Job on Ubuntu 14.04 Oct 13, 2016 As I've now noted a number of times, I'm in the process of a large scale AWS migration and we've had stability problems. Unlike previ...
-
10
Ruby background processes with upstart user jobsHi, weʼre arkency 👋
-
8
Starting UpFresh Off IPO, Upstart’s CEO Shares Why the Startup Isn’t a Typical Success StoryLast week,
-
11
Comment The big corporate clunking fists are taking aim at their upstart rivals Even when they enter the market late, such as Disney with streaming, giant multinationals can still walk away with the pri...
-
6
News » News & Analysis » Fundi...
-
2
AI upstart Cloudwalk Technology gets green light for Shanghai IPO- PingWestAI upstart Cloudwalk Technology gets green light for Shanghai IPO 21 hours ago AI startup Cloudwalk Technology gets green light for initial public offering (IPO...
-
9
allyLikes: Alibaba's answer to fast-fashion upstart SheinallyLikes: Alibaba's answer to fast-fashion upstart Shein Aron Chen posted on October 22, 2021 6:22 pmEditor :
-
7
Indian fintech upstart Paytm denies report of data leak to Chinese investors Indian fintech upstart Paytm denies report of data leak to Chinese investors Rebbeca Ren
-
6
Running A Leiningen/Ring Webapp As A Daemon Via Upstart (Ubuntu) July 27, 2013 Running a Java/Clojure app as a daemon on Linu...
-
10
2022 Lucid Air Grand Touring First Drive: Electric Upstart Leads The Pack By
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK