How to install and configure MariaDB10.0.14 in CentOS 7

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.