Centos7 yum安装mariadb
  NtjPTeejRrEF 2023年11月02日 72 0

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; 刷新权限,

Centos7 yum安装mariadb_mysql

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就安装完成了!

【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  b1UHV4WKBb2S   2023年11月13日   31   0   0 ide抗锯齿
  b1UHV4WKBb2S   2023年11月13日   30   0   0 裁剪ideflutter
  zSWNgACtCQuP   2023年11月13日   27   0   0 ide
NtjPTeejRrEF