banner
xingli

xingli

猫娘爱好者

Managing the database container for Holo's blog

Managing the database container for Holo blog#

After installing Holo, it comes with a MySQL 8 database if you are using the official MySQL instance.
This database also supports read and write for other applications, you just need to use the password you set when starting the container. Here is how to manage the database inside the container.
You can install the MySQL client inside the container and use the command line to manage it:

  1. Enter the host where the MySQL container is running:

    docker ps # View the container name or ID
    docker exec -it <container name or ID> /bin/bash
    

image
After entering the container, the left side of your container will change to the bash name.
image
You can then use database commands to log in and manage the database.
After mysql -u root -p, enter your database root password to enter the MySQL environment.
image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.