欢迎投稿

今日深度:

CentOS7安装MariaDB,centos7mariadb

CentOS7安装MariaDB,centos7mariadb


配置国内yum源

1.新建MariaDB.repo文件编辑内容如下

[mariadb]
name = MariaDB
baseurl = http://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64/
gpgkey=http://mirrors.ustc.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

2.然后把这个文件放到 /etc/yum.repos.d/ 目录下即可

3.yum安装命令

sudo yum install MariaDB-server MariaDB-client 

 

初始化数据库

1.设置root密码:

UPDATE user SET password=password('123456') WHERE user='root';

2.设置root远程连接权限:

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

3.设置数据库表名不区分大小写

   我们去/etc/my.cnf.d文件夹下找到server.cnf
   在[mysqlld]下加上
   lower_case_table_names=1
   默认是等于0的,即大小写敏感。改成1就OK了。

www.htsjk.Com true http://www.htsjk.com/mariadb/26009.html NewsArticle CentOS7安装MariaDB,centos7mariadb 配置国内yum源 1.新建MariaDB.repo文件编辑内容如下 [mariadb]name = MariaDBbaseurl = http://mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64/gpgkey=http://mirrors.ustc.edu.cn/mariadb/yum/...
相关文章
    暂无相关文章
评论暂时关闭