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
?
After any configuration change, MySQL server needs a restart to bring the changes into effect. And, sometimes this restart can fail with errors like “Stopping mysql database server: mysqld failed! ” At Bobcares, we help server owners to fix MySQL server errors as part of our Support Services for Web Hosts.
First, launch the Command Prompt by pressing Windows+Rto open the Runbox and type cmdand press Enter. Second, navigate to the bin folder of the MySQL if it is not in the Window path environment. Third, use the following command to stop MySQL Server: mysqladmin -u root -p shutdown Enter password: ********
mysqld_safe is a safe way to start a MySQL server after an error occurs. Moreover, it adds a few safety features while restarting the server after an error.
1 Just go to task manager. 2 Then in process, search mysqld. 3 right click on mysqld then click on stop. 4 with this process you can stop it without using commands. More ...
The command is:
$ mysqladmin shutdown
The other answers did not work for me. Had to to this
sudo killall -KILL mysql mysqld_safe mysqld
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With