我要评分
获取效率
正确性
完整性
易理解

Installation Description

  • The MySQL thread pool feature is provided in a patch. Apply the patch in the MySQL source code, and then compile and install the MySQL database.
  • The patch is developed for MySQL 8.0.20.
  • For details about the environment requirements for using the patch, see MySQL Porting Guide.
  1. Download and decompress the MySQL 8.0.20 source package, and go to the MySQL source code directory.
    1
    2
    3
    4
    cd /home
    wget https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.20.tar.gz --no-check-certificate
    tar -zxvf mysql-boost-8.0.20.tar.gz
    cd mysql-8.0.20
    

    You can also download mysql-boost-8.0.20.tar.gz from https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.20.tar.gz and save it to the target path, for example, /home.

  2. In the root directory of the source code, run the git init command to create Git management information.
    1
    2
    3
    git init
    git add -A
    git commit -m "Initial commit"
    
    • Generally, Git is provided by the system. If not, configure the Yum source by following instructions in MySQL Porting Guide and then install Git.
      1
      yum install git
      
    • If the Git commit user information is not configured, configure the user email and user name before running the git commit command.
      1
      2
      git config user.email "123@example.com"
      git config user.name "123"
      
  3. Download the patch file and upload it to the root directory of the MySQL source code.
    1
    wget https://gitee.com/kunpengcompute/mysql-server/releases/download/KunpengBoostKit21.0.0-threadpool8/0001-THREAD_POOL_8.patch --no-check-certificate
    
  4. Check whether the content is modified.
    1
    git status
    
    The following shows that a 0001-THREAD_POOL_8.patch file is added.
    1
    2
    3
    4
    5
    6
    # On branch master
    # Untracked files:
    #   (use "git add <file>..." to include in what will be committed)
    #
    #       0001-THREAD_POOL_8.patch
    nothing added to commit but untracked files present (use "git add" to track)
    
  5. Apply the patch file.
    1
    2
    git apply --check 0001-THREAD_POOL_8.patch
    git apply --whitespace=nowarn 0001-THREAD_POOL_8.patch
    
  6. Compile and install the MySQL source code. For details, see MySQL Porting Guide.
  7. After MySQL is recompiled and installed successfully, check the new information_schema table in the thread pool to ensure that the patch has taken effect. For details, see New information_schema Tables.