2025年OpenStack基础环境搭建----运行“mysql_secure_installation”出现错的解决方法

OpenStack基础环境搭建----运行“mysql_secure_installation”出现错的解决方法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

大家好,我是讯享网,很高兴认识大家。

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

在这里插入图片描述这样错误就能解决了

小讯
上一篇 2025-03-03 10:25
下一篇 2025-03-17 15:45

相关推荐

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