How to install and configure MariaDB10.0.14 in CentOS 7
System Environment: CentOS 7
MariaDB version: MariaDB 10.0.14
: Http://mirrors.neusoft.edu.cn/mariadb/mariadb-10.0.14/source/mariadb-10.0.14.tar.gz
Other package address: https://downloads.mariadb.org/
Add a mysql user
Useradd mysql
Start compilation and installation of MariaDB
Wget http://mirrors.neusoft.edu.cn/mariadb/cmariadb-10.0.14/source/mariadb-10.0.14.tar.gz
Tar zxvf mariadb-10.0.14.tar.gz
Cd mariadb-10.0.14
Cmake.
Make
Make install
Chown-R mysql/usr/local/mysql/
Scripts/mysql_install_db -- user = mysql
/Usr/local/mysql/bin/mysqld_safe -- user = mysql &
If an error is reported during startup, MariaDB should create some log files by default, or run related files, but they are not created, or the specified directory does not exist.
It is usually because:
1. You are not authorized to create the mariadb. log File in/var/log/mariadb /.
2. You do not have permission to create mariadb. pid in/var/run/mariadb.
Create two directories respectively.
Mkdir/var/log/mariadb
Mkdir/var/run/mariadb
Chown mysql-R/var/run/mariadb # ownership to the mysql user; otherwise, the/var/run/mariadb. pid file cannot be created.
Of course, the above configuration can be modified, and the my. cnf configuration file can be used to modify its location.
Modify the root user password:
/Usr/local/mysql/bin/mysqladmin-u root password '000000'
Other possible problems
1. mysql client cannot be started
Modify/etc/my. cnf
[Mysql]
Socket =/var/lib/mysql. sock
2. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql. sock' (2)
This error is caused by the socket location. Add a soft link. Of course, you can modify the sock location of/etc/my. cnf.
Ln-s/var/lib/mysql. sock/tmp/mysql. sock
Linux Tutorial: How to check the MariaDB server version
Implementation of MariaDB Proxy read/write splitting
How to compile and install the MariaDB database in Linux
Install MariaDB database using yum in CentOS
Install MariaDB and MySQL
How to migrate MySQL 5.5 database to MariaDB 10 on Ubuntu
Install MariaDB on the Ubuntu 14.04 (Trusty) Server