- Download mariadb:https://downloads.mariadb.org/I choose mariadb-10.0.20-linux-x86_64.tar.gz this version
- Copy the installation files/opt directory and unzip to the current directory tar-zxf mariadb-10.0.20-linux-x86_64.tar.gz
- Change the extracted file name to MARIADB
- Groupadd MySQL
- useradd-g MySQL MySQL
- Cd/opt/mariadb
- Chown-r Mysql:mysql/opt/mariadb/data
- Copy the my-medium.cnf under the Mariadb/support-files to the MARIADB directory and change to MY.CNF
- ./scripts/mysql_install_db--DEFAULTS-FILE=./MY.CNF//Initialize Database
- CP Support-files/mysql.server/etc/rc.d/init.d/mysqld
- chmod +x/etc/rc.d/init.d/mysqld
- CP SUPPORT-FILES/MY-LARGE.CNF/ETC/MY.CNF
- Modify/etc/rc.d/init.d/mysqld
- Basedir=/opt/mariadb
- Datadir=/opt/mariadb/data
- Service mysqld Start
- Modify environment variable add mariadb Bin directory edit/etc/profile, add export path= $PATH:/opt/mariadb/bin/
- Modify the root user password./bin/mysqladmin-u root password ' 123456 '
- Log in to MySQL./bin/mysql-u root-p
- To set database permissions:
- MySQL [(none)]> use MySQL;
- MySQL [mysql]> Update user set host= '% ' where user= ' root ' and host= ' 127.0.0.1 ';
- MySQL [mysql]> Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT option;
- MySQL [mysql]> flush Privileges;
Centos6.5 installation mariadb-10.0.20-linux-x86_64.tar.gz