How does MySQL really start?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How does MySQL really start?

Kevin O'Gorman
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.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How does MySQL really start?

Kevin O'Gorman
I solved it.  I was trying to use code that is inactive in Xubuntu 16.04.  I needed to fool with the systemd stuff in /etc/mysql/mysql.conf.
In particular, I added my switch to mysqld.cnf in that directory.

On Fri, Jan 12, 2018 at 2:40 PM, Kevin O'Gorman <[hidden email]> wrote:
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.




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

Please consider the environment before printing this email.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users