CentOS6.7系统中编译安装MariaDB数据库

前端之家收集整理的这篇文章主要介绍了CentOS6.7系统中编译安装MariaDB数据库前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

环境:CentOS6.7,minimal安装。

前提条件:安装了编译环境,安装了Apache。

1、下载解压

2、创建数据目录

3、添加用户和组

MysqL #chown -R MysqL.MysqL /mydata/data

4、添加连接文件

MysqL

5、更改文件所有者和属组

MysqL # chown -R root.MysqL ./*

6、初始化数据库

[root@localhost MysqL]# scripts/MysqL_install_db --datadir=/mydata/data/ --user=MysqL

注意:这里初始化的时候,后面的data目录与my.cnf中的目录必须一直,否则MysqLd服务无法启动。

7、设置配置文件

MysqL # cp support-files/my-large.cnf /etc/MysqL/my.cnf/ # vim /etc/MysqL/my.cnf

8、提供服务脚本

MysqL.server /etc/rc.d/init.d/MysqLd # chmod +x /etc/rc.d/init.d/MysqLd # chkconfig --add MysqLd # service MysqLd start

9、测试

# ss -tnl

10、导入二进制执行路径

MysqLd.sh export PATH=/usr/local/MysqL/bin:$PATH # . /etc/profile.d/MysqLd.sh
原文链接:https://www.f2er.com/mariadb/64642.html

猜你在找的Mariadb相关文章