-
-
Save kekeimiku/e1da488d96727789de88332499a51d57 to your computer and use it in GitHub Desktop.
#!/bin/sh | |
docker exec -i mysql /usr/bin/mysql $@ -p2325373912 |
#!/bin/sh | |
docker exec -i mysql /usr/bin/mysqldump $@ -p2325373912 |
#!/bin/sh | |
docker exec -i postgres /usr/local/bin/pg_dump $@ |
#!/bin/sh | |
docker exec -i postgres /usr/local/bin/pg_restore $@ |
@ssheduardo Assuming your container has the port 3307 exposed to your local machine, use the loopback IP address of your computer to access the container, 127.0.0.1 and port 3307
Same goes to the OP: if you use the host "localhost" the mysql client will use the socket connection to connect to the database for some unknown reason. Use the loopback address whenever you want to connect to the database from outside using the mysql client.
@ssheduardo Assuming your container has the port 3307 exposed to your local machine, use the loopback IP address of your computer to access the container, 127.0.0.1 and port 3307
Same goes to the OP: if you use the host "localhost" the mysql client will use the socket connection to connect to the database for some unknown reason. Use the loopback address whenever you want to connect to the database from outside using the mysql client.
Thanks!!!
I have created mysqldump in /usr/local/bin
Now when I want to export the database I get an error.
The database is in my container and I access it with ip 0.0.0.0.0 and port 3307.