MariaDB修改root密码
MariaDB [(none)]> usemysql; MariaDB [mysql]> UPDATE user SET password=password("newpassword") WHERE user="root";
MariaDB [mysql]> flush privileges; MariaDB [mysql]> exit;
2.2 或者,使用 set 指令设置root密码: MariaDB [(none)]> SET password for"root"@"localhost"=password("newpassword");
MariaDB [(none)]> exit;
1044/1045 - Access denied for user "username"@"yourhost"
度娘很久都未能解决,大多都是修改配置文件,或是执行如下SQL:
update user set Password=password("111111") where `user`="root";
我本地执行没有成功,而且还报了一个错误:ERROR 1348 (HY000): Column "Password" is not updatable
官网上解决办法则很直接而且也很有效
GRANT ALL PRIVILEGES ON *.* TO "YourUserName"@"%" IDENTIFIED BY "YourPassword";
以上是 MariaDB修改root密码 的全部内容, 来源链接: utcz.com/z/513787.html