Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question. How is suppose to be use? #25

Open
juan-morales opened this issue Jun 2, 2021 · 3 comments
Open

Question. How is suppose to be use? #25

juan-morales opened this issue Jun 2, 2021 · 3 comments

Comments

@juan-morales
Copy link

I Know that with docker-compose up... I spin up Everything.

But what About the DB? I Know I Can't manually import it... But is there any automatic mechanism that will import the dump?

@adrianpisabarrogarcia
Copy link

Try to import it with phpmyadmin or entering on the sql shell

@jcavat
Copy link
Owner

jcavat commented Jun 15, 2021

I don't understand your question "what about the db" ? docker-compose up will import the db.

@pliski
Copy link

pliski commented Jun 19, 2021

Maybe the op question was about executing again the sql in the dump directory on successives docker-compose up.

Unfortunately this is not how it is meant to work.
You can see the first answer to this question for more info:
https://stackoverflow.com/questions/38504257/mysql-scripts-in-docker-entrypoint-initdb-are-not-executed/52715521

As a quick and dirty workaround I installed /var/lib/mysql locally, in order to be able to easily delete all the content and force the install script to reload the sql.

Here are the changes in the docker-compose.yml:

From:

volumes:
           ....
            - persistent:/var/lib/mysql

to:

volumes:
           ....
            - ./mysql_data:/var/lib/mysql

But, as the op stated, an easiest way is to re-import the sql in phpmyadmin or from mysql shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants