In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to deploy MySQL8.0.20 stand-alone". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this "how to deploy MySQL8.0.20 stand-alone" article can help you solve the problem.
0. Environmental needs
1. Prepare the Linux environment (system: CentOS7)
two。 Prepare the MySQL installation package (version 8.0.20)
3. The installation method is: msyql decompression installation
1. Installation step 1. Download the unzipped mysql installation package file 2. Upload and decompress (my upload here is xhell, of course, you can also use other methods) # # create the mysql directory mkdir-p / usr/app/mysql## move to the directory cd / usr/app/mysql## use xhell to upload files to the server # # unzip and rename tar-zxvf mysql-8.0.20-el7-x86_64.tar.gzmv mysql-8.0.20-el7-x86_64 mysql-8.03. Create the data file storage path in the mysql directory and grant the right # # create each instance data storage directory mkdir-p / usr/app/mysql/mysql-8.0/ {3306 usr/app/mysql/mysql-8.0/ 3307 usr/app/mysql/mysql-8.0/3306/log/error.logtouch 3308} / data## create each mysql corresponding to error log mkdir-p / usr/app/mysql/mysql-8.0/ {3306 logtouch / usr/app/mysql/mysql-8.0/3306/log/error.logtouch / usr/app/mysql/mysql-8.0 / 3307/log/error.logtouch / usr/app/mysql/mysql-8.0/3308/log/error.log## create mysql user groups and user groupadd mysqluseradd-g mysql mysql## directory ownership weighted chown-R mysql:mysql / usr/app/mysql4. Configure the my.cnf file # For advice on how to change settings please see# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html[client]default-character-set=utf8mb4[mysqld]user=mysqlbasedir=/usr/app/mysql/mysql-8.0lower_case_table_names=1[mysqld_multi]mysqld=/usr/app/mysql/mysql-8.0/bin/mysqld_safemysqladmin=/usr/app/mysql/mysql-8.0/bin/mysqladminlog=/usr/app/ Mysql/mysql-8.0/mysqld_multi.log# 3306 database instance [mysqld3306] port=3306server_id=1mysqld=mysqldmysqladmin=mysqladmindatadir=/usr/app/mysql/mysql-8.0/3306/datasocket=/tmp/mysql_3306.socklog-error=/usr/app/mysql/mysql-8.0/3306/log/error.logpid-file=/usr/app/mysql/mysql-8.0/3306/mysql3306.pid## skip-grant-tables # is used to skip the password to login to character_set_server=utf8mb4init_connect='SET NAMES utf8mb4' Lower_case_table_names=1explicit_defaults_for_timestamp=true# 3307 database instance [mysqld3307] port=3307server_id=2mysqld=mysqldmysqladmin=mysqladmindatadir=/usr/app/mysql/mysql-8.0/3307/datasocket=/tmp/mysql_3307.socklog-error=/usr/app/mysql/mysql-8.0/3307/log/error.logpid-file=/usr/app/mysql/mysql-8.0/3307/mysql3307.pid# lc_messages_dir=/usr/local/mysql/share/english## default maximum number of connections setting # max_connections=300character_set_server=utf8mb4init_connect='SET NAMES utf8mb4'lower_case_table_names=1explicit_defaults_for_timestamp=true# 3308 database instance [mysqld3308] port=3308server_id=3mysqld=mysqldmysqladmin=mysqladmindatadir=/usr/app/mysql/mysql-8.0/3308/datasocket=/tmp/mysql_3308.socklog-error=/usr/app/mysql/mysql-8.0/3308/log/error.logpid-file=/usr/app/mysql/mysql-8.0/3308/mysql3308.pid# lc_messages_dir=/usr/local/mysql/ Share/englishcharacter_set_server=utf8mb4init_connect='SET NAMES utf8mb4'lower_case_table_names=1explicit_defaults_for_timestamp=true5. Initialize each instance database / usr/app/mysql/mysql-8.0/bin/mysqld-defaults-file=/etc/my.cnf-datadir=/usr/app/mysql/mysql-8.0/3306/data/-initialize/usr/app/mysql/mysql-8.0/bin/mysqld-defaults-file=/etc/my.cnf-datadir=/usr/app/mysql/mysql-8.0/3307/data/-initialize/usr/app/mysql/mysql- 8.0/bin/mysqld-defaults-file=/etc/my.cnf-datadir=/usr/app/mysql/mysql-8.0/3308/data/-initialize
Remember the temporary password and use it later when logging in, for example:
2022-04-04T15:12:39.011998Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: sJH): ayhH5cW
2022-04-04T15:14:24.214337Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: y) qhyh/4E7
2022-04-04T15:15:32.283026Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: s7qrjzwqI
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.