apt 安裝 MySQL 5.7以後 更新日期: 2020/02/19 1. $ sudo -i 2. $ mysql_secure_installation 3. $ mysql -u root 4. mysql> create user '<username>'@'localhost' IDENTIFIED BY '<password>' 5. mysql> GRANT ALL PRIVILEGES ON * . * TO '<username>'@'localhost'; 6. FLUSH PRIVILEGES; 7. exit