MySQL create account

建立Account: mealadmin@localhost (@localhost代表可以在local登入)
並且給予密碼12345
並給予所有的權限

CREATE USER 'mealadmin'@'%' IDENTIFIED BY 'xxxxxxxx';
GRANT ALL PRIVILEGES ON *.* TO 'mealadmin'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

初次建立的DB會有預設的root帳號
請先把root帳號的密碼設定好
必要的話,移除root@%的設定

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('xxxxxxxx');
SET PASSWORD FOR 'root'@'tucson' = PASSWORD('xxxxxxxx');
SET PASSWORD FOR 'root'@'%' = PASSWORD('xxxxxxxx');

這個網誌中的熱門文章

Bash判斷參數是否存在

使用 minikube 輕鬆上手 kubernetes