Docker installation of Baota panel AnQiCMS: Easily obtain and fill in the MySQL root password guide

As an experienced website operations expert, I know that how to efficiently and accurately handle database configuration is the key to successful rapid deployment of a content management system.AnQiCMS (AnQiCMS) has won the favor of many small and medium-sized enterprises and self-media operators with its efficient and concise features based on the Go language.Install AnQiCMS through the Docker container feature of Baota panel is undoubtedly an efficient way to achieve this goal.How to obtain and correctly fill in the MySQL root password when installing AnQiCMS in the Docker environment of Baota Panel?

This guide will start from my practical experience and give you a detailed explanation of this key step to ensure your AnQiCMS goes live smoothly.

Step out the first step: Preparation of Baota panel and Docker environment

Make sure that the Baota panel is installed on your server and the Docker service is ready inside the panel.If you are using it for the first time, Baota panel usually guides you to install Docker.These basic environments are the prerequisites for deploying AnQiCMS and MySQL in our Docker containers.

Obtaining the root password of the MySQL container——Core steps

When using Docker to install AnQiCMS on the Baota panel, you will find that we need to deploy a Docker version of MySQL database first for AnQiCMS to use.This step is the key to obtaining the root password.

  1. Installing Docker version of MySQL:Find and click on [Docker] in the left menu of the Baota panel to enter the Docker management interface.Next, switch to the [App Store] tab, and enter 'mysql' in the search box to search.According to the memory capacity of your server, choose an appropriate MySQL version for installation. For example, if the memory is less than 2GB, it is recommended to choose version 5.6, while version 5.7 is the default and more commonly used choice.Ensure that the 'Allow external access' option is selected.This is a necessary condition for AnQiCMS container to connect to the MySQL container.

  2. Check MySQL details, get the root password:MySQL container is installed, it will appear in the [Docker] -> [Container] list.Please do not install AnQiCMS in a hurry.The key is that you need to click the [Details] link on the right side of the just installed MySQL container. After entering the details page of the MySQL container, you will see the configuration information of this MySQL instance, including the password for the root user.Please carefully copy down this root password:This is the database password that needs to be filled in during the AnQiCMS installation process.This step is crucial because it is automatically generated by the MySQL container, not set by you.

Install AnQiCMS container and fill in the database information

With the MySQL root password, we can continue to install AnQiCMS.

  1. Search and install AnQiCMS:Similarly, in the [Docker] -> [App Store], search for 'anqicms', find and click the [Install] button.

  2. Fill in the AnQiCMS installation information:In the installation and configuration interface of AnQiCMS, you need to fill in some basic information, including:

    • Website domain:The domain name that your AnQiCMS website will use, for example:www.anqicms.com.
    • Database Name:The database name that AnQiCMS will use, usually it isanqicmsIf you plan to install multiple AnQiCMS instances on the same server, make sure to use a unique database name for each instance.
    • Database password:This column is the MySQL root password we took the trouble to obtain earlier!Please accurately paste the root password you copied from the MySQL container details page here.
    • Port:The port that the AnQiCMS container will run on, the default is8001. If you install multiple AnQiCMS, you also need to allocate a different port for each instance.
  3. Installation completed:Confirm all information is correct before clicking the [OK] button.The Baota panel will start pulling the AnQiCMS image and creating a container.This process may take a few minutes, please be patient.After installation, the AnQiCMS container will appear in your Docker container list.

Next steps: Configure reverse proxy and website initialization

AnQiCMS container installation is complete. You still need to configure a reverse proxy website for it to access through a domain name. This can be easily achieved in the Baota panel under the [Website] -> [Reverse Proxy] feature, with the proxy address pointing to127.0.0.1:您AnQiCMS容器的端口(For example)127.0.0.1:8001}]

Finally, visit the domain you have bound in the browser, AnQiCMS will guide you through the initial installation of the website, including setting up the backend administrator account and password.Your CMS website can run normally now.

By following these detailed steps, you should be able to clearly understand how to obtain and correctly fill in the MySQL root password in the Baota panel Docker environment, and smoothly deploy AnQiCMS.This process involves multiple steps, but as long as you operate carefully, each step can be easily completed.


Common Questions (FAQ)

  1. What to do if you forget or can't find the MySQL root password?If you forget the root password or accidentally lose it after installation, don't worry.In the Baota panel's [Docker] -> [Container] list, find your MySQL container and click [Details] on the right.In the detail page, the root password will be displayed directly.If the page content is refreshed or closed, the password will usually remain unchanged, and you can check it whenever you want.If for some reason the password is changed or cannot be recovered, the most direct method is to delete the current MySQL container, install a new MySQL container, and then follow the above steps to obtain the newly generated root password.

  2. Failed to install AnQiCMS after entering the password,提示database connection error?An error occurred while connecting to the database, usually due to several reasons:

    • The MySQL password is incorrect:Please confirm that the password you have entered is the root password copied from the MySQL container details page, to avoid typographical errors when manually entering it.
    • “Allow external access” not selected: Ensure that the 'Allow external access' option is checked when installing the MySQL container. Otherwise, the AnQiCMS container cannot connect to MySQL from outside (within the Docker network).
    • MySQL container did not start normally:Check if the MySQL container status is 'running'. If not, try to restart the MySQL container.
    • Port conflict or firewall:Check if the default MySQL port 3306 (or any custom port you have set) is occupied, or if the server firewall is blocking access to port 3306.Allow 3306 port in the Baota panel security group.
  3. Why is it recommended to check 'Allow external access' when installing MySQL with Docker?In the Docker environment, each container has its own network space.AnQiCMS container and MySQL container are on the same physical server, but they communicate through Docker's internal network.Enabling "Allow external access" actually allows the Docker host (i.e., your server itself) and other containers within the Docker network to access the MySQL service via port.For AnQiCMS, it needs to go through this 'external access' channel as another Docker container to connect smoothly to the database in the MySQL container.If not selected, the MySQL service may only be available within its own container, causing AnQiCMS to be unable to connect.