MySQL with phpmyadmin using docker setup in local or development environment.

Надежный VDS
2 Просмотры
Поддержите сайт и поделитесь материалом в соц.сетях:

Издатель
MySQL and phpmyadmin setup for development in local machine using docker. access mysql CLI utiltiy from docker container.

MySQL and PhpMyAdmin docker setup in local

official website
https://hub.docker.com/_/mysql
https://hub.docker.com/r/phpmyadmin/phpmyadmin/


preRequisties:-
Docker
mysql
phpMyAdmin

MYSQL :-
MySQL is an open-source relational database management system.


PhpMyAdmin:-
phpMyAdmin is a free and open source administration tool for MySQL and MariaDB.
As a portable web application written primarily in PHP

pull docker image

$ docker pull mysql:latest

$ docker run --name dev-mysql -e MYSQL_ROOT_PASSWORD=pass123 -d mysql:latest

now mysql server is running now let us pull the phpmyadmin and create the container

$ docker pull phpmyadmin/phpmyadmin:latest

$ docker run --name dev-phpmyadmin -d --link dev-mysql:db -p 7098:80 phpmyadmin/phpmyadmin

access phpmyadmin http://localhost:7098/

root and pass pass123

access using CLI

$ docker exec -it dev-mysql bash

$ mysql -u root -p
select now();
select current_timestamp();
select current_date,curdate(),current_date();

Blog
http://techwasti.com/
Medium Publication
https://medium.com/techwasti/
Категория
MariaDB
Комментариев нет.
Kwork.ru - услуги фрилансеров от 500 руб.