That’s it? Do I have to execute only this line?
A: Yes.
This article is a silver bullet for those who want to deploy a Percona Server MySQL to quickly test something and don’t want to waste time launching an EC2/RDS instance or installing MySQL in bare metal. So, let’s go for magic:
1-) First make sure that you have docker up and running
1 2 3 4 5 6 |
[root@proxysql ~]# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: active (running) since Sun 2018-11-25 23:04:45 UTC; 5min ago Docs: https://docs.docker.com Main PID: 1313 (dockerd) |
2-) Next, execute the command line:
1 2 |
$ docker run -d -it -e MYSQL_ROOT_PASSWORD=percona --name p57 percona:5.7.19 --binlog_group_commit_sync_delay=500000 --log-bin --sync-binlog=0 --innodb-flush-log-at-trx-commit=2 --server-id=51 ffedba37850a9f27334103a47878783fbb99f85ae97ed640439899ba7b14a6ab |
3-) Furthermore, for validate you can run:
1 2 3 4 5 6 7 |
# docker exec -it p57 mysql -uroot -ppercona -e "select @@version" mysql: [Warning] Using a password on the command line interface can be insecure. +---------------+ | @@version | +---------------+ | 5.7.19-17-log | +---------------+ |
And Voila! Finally, it is also possible to set parameter configuration on the command line in case any specific setting is necessary.
In the next article, I will present how to fully automate a deploy using Vagrant+Ansible.
See ya!