雲伺服器安裝MySQL設定自啟實作遠端
設定開機自啟:sudo systemctl enable --now mysqld
設定密碼:sudo mysql_secure_installation YYYYY
實作遠端:use mysql;
update user set host = '%' where user = 'root';
報錯:ERROR 1062 (23000): Duplicate entry '%-root' for key 'PRIMARY'
不予理會:執行重新整理:flush privileges;
sudo systemctl restart mysqld 重新開機服務