2020年3月12日星期四

全新安装 MariaDB,并初始化密码

设置数据库

在终端中,运行MySQL安全安装命令
sudo mysql_secure_installation
此时系统会询问你:Enter current password for root (enter for none): ,按回车(enter)键,因为第一次登陆是没有密码的。
然后会询问你: Set root password? —— 按 y ,进行root帐号的密码设置
此时,会提示 New password ,在此输入你的MySQL密码,请牢记这个密码,输入完成按回车,会提示re-enter new password此时再重复输入密码,回车即可。
然后,询问你 Remove anonymous users ,按 y 。
然后,询问你 Disallow root login remotely ,按 y 。
然后,询问你 Remove test database and access to it ,按 y 。
然后,询问你 Reload privilege tables now ,按 y 。
最后,您将看到消息 All done! 和 Thanks for using MariaDB! 。表示已经设置完成了。

sudo mysql -uroot -p       ------>一定要用 sudo




没有评论:

发表评论

youtube的dns屏蔽方法

  216.239.38.120 是 Google 提供的一个特殊 DNS 服务器,用于强制开启 YouTube 受限模式(Restricted Mode) 。 如果你想在家里强制 YouTube 进入受限模式,可以在 路由器的 DNS 设置 中配置以下 DNS 服务器: D...