Docker (6): Build MARIADB Database with Dokcer

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/53540615 not allowed to reprint without the Bo master.
Bo main address is: Http://blog.csdn.net/freewebsys

1, about MARIADB

is actually another open source project for MySQL. Open source version that you do not want to be controlled by Oracle.
Here's a handy way to use the official Docker image.
You need to install the image itself, compile configuration what.
This is especially convenient. Just download the installation and you're ready.
Project Address:
/mariadb/">https://hub.docker.com/r//mariadb/

2, download use

Download the local image first, then start the line.
1), reference documentation
If the system turns on SELinux, you need to set folder permissions, otherwise the MARIADB will not start.

-p /data/mysql/data-Rt svirt_sandbox_file_t /data/mysql/data-v /data/mysql/data:/var-p3306:3306-e MYSQL_ROOT_PASSWORD=---d mariadb:latest

Mysql_root_password is the password to set ROOT.
Then use Docker PS to view:

The boot was successful, and Port 3306 is bound to use MySQL.

docker exec -it mariadb bashroot@XXXX:/# mysql -uroot -proot

You can use MySQL.

Welcome to  theMariaDB Monitor. CommandsEnd  with;or\g.your MariaDB ConnectionID  is 3Serverversion:10.1.-mariadb-1~jessie mariadb.org binary distributioncopyright (c) -, ., Oracle, MariaDB Corporation Ab andOthers. Type ' help; 'or' \h ' forHelp. Type ' \c ' toClear theCurrent input statement. MariaDB [(None)]> show databases;+--------------------+| Database |+--------------------+| Information_schema | | MySQL | | Performance_schema |+--------------------+3Rowsinch Set(0.00SEC) MariaDB [(None)]>

3, Summary

The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/53540615 not allowed to reprint without the Bo master.
Bo main address is: Http://blog.csdn.net/freewebsys

Install the MARIADB using one of the simplest methods. And put the data in the/data/mysql/data directory of the host.
Easy data backup. Data migration while exposing 3306 ports to external.
Using Docker is also very handy, much simpler than the Yum installation configuration.
The configuration file can also be modified by directory mapping.
and completely split the service, storage, interface. It's really a container.

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.