In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Decompress mysql mysql-8.0.21-linux-glibc2.12-x86_64.tar
Decompression
Tar-xvf mysql-8.0.21-linux-glibc2.12-x86_64.tar
Tar-xvJf mysql-8.0.21-linux-glibc2.12-x86_64.tarr.xz
2. Cp-r mysql-8.0.21-linux-glibc2.12-x86_64 mysql8.21/
3. Add user group groupadd mysql
4. Add the user group useradd-g mysql mysql to which the user product belongs.
5. Check whether the addition is successful, id mysql.
6. Initialization
Bin/mysqld-initialize-user=mysql-basedir=/mysql/mysql8.21-datadir=/mysql/mysql8.21/data
. / mysqld-initialize-user=mysql-basedir=/mysql/mysql8.21-datadir=/mysql/mysql8.21/data
2020-07-15T01:36:10.855350Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using-- skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2020-07-15T01:36:10.855903Z 0 [System] [MY-013169] [Server] / mysql/mysql8.21/bin/mysqld (mysqld 8.0.21) initializing of server in progress as process 151504
2020-07-15T01:36:10.930218Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-07-15T01:36:13.983064Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-07-15T01:36:16.019130Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: u?B7*9O9uj
Record the temporary login password of the previous step root@localhost: 2fZkV6HGCi?
7. Configuration parameter file my.cnf
Vi / mysql/mysql8.21/support-files/my.cnf
[mysqld]
Port = 3308
Socket = / mysql/mysql8.21/run/mysql.sock
Datadir = / mysql/mysql8.21/data
Basedir=/mysql/mysql8.21/
Default_storage_engine = InnoDB
Max_connections = 2048
Open_files_limit = 65535
Max-connect-errors=100000
Skip-name-resolve
Character-set-server=utf8
Log-error = mysql_error.log
Log-bin = / mysql/mysql8.21/log/master-bin
Log-bin-index=/mysql/mysql8.21/log/master-bin.index
Slow_query_log = 1
Slow_query_log_file = / mysql/mysql8.21/log/mysql_slow_query.log
Long_query_time = 10
Relay_log = / mysql/mysql8.21/log/master-relay-bin
Server-id=101
Relay-log-info-repository=TABLE
Master-info-repository=TABLE
Sync_binlog=1
Sync_relay_log=1
Log_slave_updates=1
8. Create RSA private key bin/mysql_ssl_rsa_setup-- datadir=/mysql/mysql8.21/data
9. If you forget the initial password (root)
You can start mysql to skip Mysql password verification
/ mysql/mysql8.21/bin/mysqld_safe-defaults-file=/mysql/mysql8.21/support-files/my.cnf-skip-grant-tables
Use mysql
Update user set authentication_string='' where user='root'
Reset the password to empty (the password cannot be changed directly at this time, it must be set to empty first, otherwise an error will be reported)
Start mysql to change password
Alter user 'root'@'localhost' identified by' mysql8.21'
10. Update the domain attribute.'% 'means external access is allowed:
Mysql > use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with-A
Database changed
Mysql > update user set host='%' where user = 'root'
Query OK, 1 row affected (0.11 sec)
Rows matched: 1 Changed: 1 Warnings: 0
Mysql > FLUSH PRIVILEGES
Query OK, 0 rows affected (0.01 sec)
Mysql > select host,user,plugin from user
+-- +
| | host | user | plugin | |
+-- +
| |% | root | caching_sha2_password |
| | localhost | mysql.infoschema | caching_sha2_password | |
| | localhost | mysql.session | caching_sha2_password | |
| | localhost | mysql.sys | caching_sha2_password | |
11. Authorization
Mysql > GRANT ALL PRIVILEGES ON *. * TO 'root'@'%'WITH GRANT OPTION
Query OK, 0 rows affected (0.34 sec)
12. A new feature caching_sha2_password has been introduced above mysql8.0.
This password encryption method is not supported by clients below Navicat 12; solution
Modify encryption method
Update user set plugin='mysql_native_password' where user='root'
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.