Author:pingfan_yu
Data:2021.12.3
报错内容:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we’ll need the current
password for the root user. If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

解决方法:
先 "crtl+C"退出然后运行 “mysql -u root -p” ,

设置自己的密码:
set password for ‘root’@‘localhost’=password(‘密码’);

授权然后退出
grant all privileges on . to root@’%’ identified by ‘密码’;
grant all privileges on . to root@‘localhost’ identified by ‘密码’;
grant all privileges on . to root@‘主机名’ identified by ‘密码’;

然后在运行:mysql -h 自己ip -u root -p
这样错误就能解决了

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/47594.html