时间:2021-07-01 10:21:17 帮助过:11人阅读
#useradd -r -g 306 -u 306 mysql
#tar xf mariadb-VERSION.tar.xz -C /usr/local
#ln -sv
#cd /usr/local/mysql
#chown -R root:mysql ./*
#scripts/mysql_install_db --datadir=/mydata/data --user=mysql
#cp supper-files/mysql.server /etc/rc.d/init.d/mysqld
#chkconfig --add mysqld
(3) 准备配置文件
配置格式:类ini格式,为各程序均通过单个配置文件提供配置信息;
[prog_name]
配置文件查找次序:
/etc/my.cnf --> /etc/mysql/my.cnf --> --default-extra-file=/PATH/TO/CONF_FILE --> ~/.my.cnf
#mkdir /etc/mysql
#cp support-files/my-large.cnf /etc/mysql/my.cnf
添加三个选项:
datadir = /mydata/data
innodb_file_per_table = on
skip_name_resolve = on
MariaDB的安装
标签:extra my.cnf mysqld data tar groupadd files nod group