docker pull msyql5.6 并使用

docker    pull msyql:5.6

mkdir   -p   /root/mysql/mysqlconf

vim   /root/mysql/mysqlconf/my.cnf

    [mysqld]
    skip-host-cache
    skip-name-resolve
    datadir = /var/lib/mysql
    init_connect='SET collation_connection = utf8_general_ci'
    init_connect='SET NAMES utf8'
    character-set-server=utf8
    collation-server=utf8_general_ci
    [mysql]
    default-character-set=utf8
    [client]
    default-character-set=utf8


docker run -d --name mysql -v /root/mysql:/var/lib/mysql -v /root/mysql/mysqlconf:/etc/mysql/conf.d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql:5.6

你可能感兴趣的:(docker,adb,容器)