I'm using mysqld_safe
to be able to create a password for my root
user (under Ubuntu 18.04, it is not asked on the installation).
To start MySQL, I have done:
$ sudo mysqld_safe --skip-grant-tables&
Now, the MySQL daemon is running and I can't stop it. Stopping it by killing the process prevent me to start another MySQL daemon because the previous one did not gave back the resources, resulting in errors like:
2018-10-31T14:50:40.238735Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-10-31T14:50:40.238815Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
So how can I stop the MySQL daemon when it have been started using mysqld_safe
?