• Hi all,

    I’ve done a page with wordpress in a docker in my local computer. Now I want to copy/paste this docker in other computer. In the same directory i have a persistent data for wordpress data and database data. but when I start the docker in the other computer I have an error “error connection with db” and the instalation starts like new.

    How can I solve this problem of database? Thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @escubicat,

    Try given below steps.

    1. Export the database from your original Docker setup.
    2. Copy the persistent data directory to the new computer.
    3. Import the database into the MySQL/MariaDB server in the new Docker setup.
    4. Update the database connection settings in the wp-config.php file.
    5. Restart the Docker container.

    This should resolve the database connection error on your new computer.

    Let me know if you problem still didn’t solved.

    Thread Starter escubicat

    (@escubicat)

    Hi, thanks for yout answer,

    sorry but I’m a beginner, how can I export the database from my original docker setup?

    Thanks

    Hi @escubicat,

    To export the database from your original docker setup. follow given below steps:-

    1. Access the Docker container running your database.
    2. Use database-specific tools like mysqldump or pg_dump to export the database.
    3. Exit the container.
    4. Copy the exported SQL file from the container to your local machine using docker cp.
    5. Optionally, stop and remove the Docker container.

    let me know if you still facing any issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘migration docker to docker’ is closed to new replies.