Ubuntu 管理心得

搜尋此網誌

2020年2月9日 星期日

mysql installation on ubuntu 18.04

  1. sudo apt update
  2. sudo apt install mysql-server
  3. sudo mysql_secure_installation
  4. sudo mysql, then issue the command: SELECT user,authentication_string,plugin,host FROM mysql.user;
Originally, the root user is authenticated with the "auth_socket" plugin.
To configure the root account to authenticate with a password,
run the following ALTER USER command.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
 
Replacing the 'password' with a new strong password. 
Note that this command will change the root password you set in Step 2. 

沒有留言:

張貼留言

網誌存檔