📅  最后修改于: 2022-03-11 15:05:02.034000             🧑  作者: Mango
-- DEFAULT: Username:root , Password: – (none)
mysql> SET PASSWORD FOR root@localhost=PASSWORD('mypassword');
mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost
IDENTIFIED BY 'mypassword' WITH GRANT OPTION;