Centos7 yum安装mariadb

1 配置yum源安装    yum配置文件 /etc/yum.repos.d

yum install mariadb mariadb-server

2 修改root用户默认密码

update user set password=password("xxxx") where user="root";  修改root用户密码

flush privileges; 刷新权限,

3.开放远程端口权限,在mysql表内执行

创建用户命令

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;

这样就已x就安装完成了,缺乏机器练手的小伙伴们可以去3A服务器看看!

posted @   胖大海啊  阅读(131)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
点击右上角即可分享
微信分享提示