Preparations
- Obtain and upload the tsdbtool package to the server, and decompress it to obtain a complete software folder tsdbtool.
- Download GCC-7.3.0 and CMake-3.5.2 source code packages and upload them to the mysqlDep folder in the tsdbtool folder. For details about the download addresses, see Table 2.
- Obtain the MySQL source package or RPM package and upload it to the tsdbtool directory.
- Modify the installation configuration file mysqlconf.csv.
Table 1 describes the parameters in the mysqlconf.csv configuration file.
Table 1 Parameters in the mysqlconf.csv configuration file Parameter
Description
isopath
Specifies the OS image path, which must be uploaded to the OS of the server in advance for installing some dependencies.
db_password
Specifies the password of the MySQL database. The tool uses this field to set the password of the database.
host
Specifies the server where MySQL is installed. If the installation is performed on the local host, enter localhost. If you need to remotely install MySQL on another server, enter the IP address of the server.
os_root_user
Specifies the root username of the OS on the server where MySQL is installed.
os_root_password
Specifies the password of user root for logging in to the OS of the server where MySQL is installed.
version
Specifies the MySQL version to be installed.
compile_flag
Determines the check process. Set this parameter to 1 for the check before RPM package compilation. Otherwise, set this parameter to 0. The number of check items is small during compilation.
basedir
Specifies the absolute path of the MySQL basedir directory, which must exist in the OS. This parameter is invalid and not used for RPM package installation.
datadir
Specifies the absolute path of the MySQL datadir directory, which must exist in the OS.
logdir
Specifies the absolute path of the MySQL logdir directory, which must exist in the OS.
port
Specifies the port used by MySQL.
innodb_buffer_pool_size
Specifies the Innodb_buffer_pool_size of MySQL.
The following uses MySQL 8.0.17 as an example to describe how to make preparations for check, install, and uninstall. Before installing MySQL using tsdbtool:
- Obtain and upload the tool package to the server, and decompress it to the /home directory to obtain the /home/tsdbtool directory.
- Upload the mysql-boost-8.0.17.tar.gz source code package or RPM package to the /home/tsdbtool directory.
- Download GCC-7.3.0 and CMake-3.5.2 source code packages to the mysqlDep directory in the tsdbtool directory.
- Modify the mysqlconf.csv file, and create datadir, logdir, and basedir in the system. (basedir is not required if you install MySQL using an RPM package.) In this example, the content of the mysqlconf.csv file is as follows:
parm,values [install-conf], isopath,/root/CentOS-7-aarch64-Everything-1810.iso db_password,123456 host,localhost os_root_user,root os_root_password,Admin@123 version,8.0.17 compile_flag,1 [mysql-conf] basedir,/usr/local/mysql datadir,/data/mysql/data logdir,/data/mysql/log port,3306 innodb_buffer_pool_size,10G