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




没有评论:

发表评论

扩容/dev/mapper/pve-root

.执行 parted /dev/sdq 输入 print 找到要扩容的盘,应该是/dev/sdq3,检查大小 resizepart 3 100% quit 再检查大小 退出parted 更新物理卷的大小,当然这里前提是使用了LVM pvresize /dev/sda3 lvdis...