Tag: mysql

How do I restore a dump file from mysqldump using kubernet?

I know how to restore a dump file from mysqldump. Now, I am attempting to do that using kubernet and a docker container. The database files are in persistent (nfs) mount. The docker cannot be accessed outside of the cluster as there is no need for anything external to touch it. I tried: kubectl run […]

Docker vs Mysql local server SQLSTATE[HY000] [2003]

I installed a docker with apache2, MySQL, and my project (zend1). I can’t import my big database to MySQL in the docker so I set it to the local Mysql Server 5.7 (127.0.0.1 port: 3307) where I imported all the data, and now at localhost, I still see this error. Fatal error: Uncaught exception ‘PDOException’ […]

MySQL docker container crashes

I’m a newbie with Docker and I’m working on a Symfony2 software development project that uses docker with MySQL, nginx and the web app containers in it. I’m constantly being disconnected from MySQL with the following error message : DriverException in AbstractMySQLDriver.php line 115: An exception occured in driver: SQLSTATE[HY000] [2003] Can’t connect to MySQL […]

How to create mysql volume which exists even if i remove the docker container

I created docker container with mysql using -v option: -v /storage/mysql1/mysql-datadir:/var/lib/mysql When i removed container i lost database saved in /var/lib/mysql . How can i create mysql container with -v option (to see everything from the host) and not lost the data?

Best way to use mysql for docker based microservices

I am developing microservices stack using spring cloud and database is mysql. for easily explain lets take one service and one mysql database. my questions what is the best way to deploy mysql database to production for container based enviorment. I can use mysql docker and mount host local file system to docker using -v […]

How to commit changed data in a mysql container to a new image

I am trying to create a custom docker image with mysql database in it. I don’t need to mount volumes or persist any data between container runs and removals. The goal is to always start containers in the same state. Use them for tests and remove them. Steps taken: Start a mariadb container from a […]

Accessing a MySql database from external IP (Docker containers)

Using Docker containers, I am trying to access a MySQL Docker container (https://hub.docker.com/_/mysql/) from other containers. To do that, I’ve been using the PhpMyAdmin docker container (https://hub.docker.com/r/phpmyadmin/phpmyadmin/) which is the most simple way to view mysql databases. Access denied However… my phpmyadmin container cannot connect to the mysql container, giving the following error : #1045 […]

Installing PDO driver in Docker

I’m trying to install pdo driver in docker. How do I install it using the below configuration? docker-compose.yml web: image: nginx:latest ports: – “8089:80” volumes: – ./code:/code – ./site.conf:/etc/nginx/conf.d/site.conf links: – php php: image: php:7-fpm volumes: – ./code:/code mysql: image: mysql:5.6.26 environment: – MYSQL_ROOT_PASSWORD=root – MYSQL_DATABASE=bignibou ports: – “3306:3306” I also have a Dockerfile which […]

Docker – secure mysql configuration

I want to make a separate docker container for mine mysql database which will run for my production and test environment. The problem is that it has the potential to exposes the port number and environment values to for example hackers who have gained access to the container. How can I write a secure mysql […]

Deploying Docker containers with port-mapping on Mesos/Marathon

I am currently working on a team project utilizing Docker with Apache Mesos/Marathon. To deploy MySQL docker containers on Mesos/Marathon, we have to create a JSON file with port mapping. I have searched everywhere on the internet and just can’t find any sample JSON file to look on for port mapping. Anyone have done this […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.