How does MySQL really start?

Kevin O'Gorman kogorman at gmail.com
Fri Jan 12 22:40:17 UTC 2018


It was suggested here that the script /etc/init.d/mysql is used in starting
MySQL but I have
been unable to confirm that by injecting code into it.  The code seems not
to execute.

So I put "set -x" into /usr/sbin/service and at the end it executed
  exec systemctl start mysql.service

Now I don't pretend to understand systemctl or systemd, but it seems likely
that this command makes it look at /lib/systemd/system/mysql.service and
this file just names

ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
ExecStart=/usr/sbin/mysqld
ExecStartPost=/usr/share/mysql/mysql-systemd-start post

And this is getting very hard for me to follow, partly because of C code
that I do not have readily at hand, and if it's as convoluted as the shell
script are, might not help me much.

What I really want to do is to inject a parameter into mysqld that will
allow me to reset the root MySQL password.

Failing that, I'd like to start over (how do I do that?)

Can anyone help?

-- 
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20180112/3031bcf4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 441 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20180112/3031bcf4/attachment.gif>


More information about the ubuntu-users mailing list