Starting the MySQL 8.0 server

You can start the server with the following commands:

  1. Using service:
shell> sudo service mysql start
  1. Using init.d:
shell> sudo /etc/init.d/mysql start
  1. If you do not find the startup script (when you are doing binary installation), you can copy from the location where you untarred.
shell> sudo cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
  1. If your installation includes systemd support:
shell> sudo systemctl start mysqld
  1. If the systemd support is not there, MySQL can be started using mysqld_safe. mysqld_safe is the launcher script for mysqld that safeguards the mysqld process. If mysqld is killed, mysqld_safe attempts to start the process again:
shell> sudo mysqld_safe --user=mysql & ...

Get MySQL 8 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.