Connect Container To Local MySQL Workbench | Local MySQL Workbench + Docker Container over SSH |

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

Издатель
Connect Container To Local MySQL Workbench | Local MySQL Workbench + Docker Container over SSH |

Docker container connect with Local Mysql Workbench

If you dont have container then run this
command and make a container

Make a container
docker run -it -p 4000:80 -v /var/www/html/lms_container/:/var/www/html/
--restart=always --name=lms -d waqargolpik/lamp:php7.4


I already have my container running///

go inside container

docker exec -it container_name bash

1) INSTALL Open ssh

i)apt update
ii)apt install openssh-server

change configuration:

go to this directory and edit
nano /etc/ssh/sshd_config

search these lines via ctrl + w
i) Port 22 Uncomment
ii) PermitRootLogin yes
iii)PasswordAuthentication yes
iv) X11Forwarding yes

now save file with ctrl + o then ctrl + x

Set password for ssh
passwd

service ssh restart


now come out the docker
2) Install workbench in local machine
https://linuxhint.com/installing_mysql_workbench_ubuntu/
https://dev.mysql.com/downloads/repo/apt/

these installtinon doc is obselete
you can install as i did :)
now search for the workbench in local pc

after installing manually you can follow this doc

now check the ip of your docker container

via docker inspect container_name

here put the password which you set via

passwd command

here put the container mysql password
which you set for phpmyadmin


restart the service of mysql inside docker then check connection
Категория
Mysql
Комментариев нет.
Kwork.ru - услуги фрилансеров от 500 руб.