Linux安装MariaDB(Mysql)和简单配置
生活随笔
收集整理的这篇文章主要介绍了
Linux安装MariaDB(Mysql)和简单配置
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
安装MariaDB
yum -y install mariadb mariadb-server
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
- 首先是设置密码,会提示先输入密码
- 设置密码
mysql -uroot -ppassword
添加用户,设置权限
创建用户命令
mysql>create user username@localhost identified by 'password';
mysql>grant all on *.* to username@localhost indentified by 'password';
mysql>grant all privileges on *.* to username@'%' identified by 'password';
mysql>grant all privileges on *.* to username@'hostname' identified by 'password' with grant option;
刷新权限
flush privileges;
转载于:https://www.cnblogs.com/larryzq/p/11009048.html
总结
以上是生活随笔为你收集整理的Linux安装MariaDB(Mysql)和简单配置的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: Web高效管理多个项目的SVN仓库
- 下一篇: LeetCode 876 Middle