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.