Skip to content
ghost-from-the-past edited this page Apr 14, 2021 · 19 revisions

MySQL 8.0 Reference Manual

https://dev.mysql.com/doc/refman/8.0/en/


for Ubuntu or Debian distributions


To enable or disable the automatic start of MySQL service when you boot your machine use

>systemctl enable mysql

>systemctl disable mysql


To start or stop manually the MySQL service use

>systemctl start mysql.service

>systemctl stop mysql.service


To show the status use

>systemctl status mysql.service

also check the errors with

>journalctl -xe

MySQL - change the default of default_authentication_plugin


since Mysql version 8.0 the default values has been changed from mysql_native_password to caching_sha2_password

this needs to be reverted in the cnf file


for my installation /etc/mysql/my.cnf is a symbolic link to /etc/alternatives/my.cnf which is a symbolic link to /etc/mysql/mysql.cnf

so we need to edit the file /etc/mysql/mysql.cnf

add the following at the end of the file

[mysqld]

default_authentication_plugin=mysql_native_password

the group [mysqld] is for the server, for the client the group is [mysql]

(info http://dev.mysql.com/doc/mysql/en/server-system-variables.html

https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html )


possible places of the cnf file

  • /etc/my.cnf
  • /etc/mysql/my.cnf
  • $MYSQL_HOME/my.cnf
  • [datadir]/my.cnf
  • ~/.my.cnf

Clone this wiki locally