Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How the CentOS7 version installs the Mysql8.0.20 version database

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you this time is the CentOS7 version of how to install the Mysql8.0.20 version of the database, the article is rich in content, interested friends can come to know, I hope you can get something after reading this article.

CentOS7 install Mysql8.0.20 steps:

Https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-20.html

The download speed of the official website is sometimes slow. You can also download it by clicking on the link: mysql 8.0.20

Download the 8.0.20Mysql package (bundle version) on the official website

1. Create a mysql folder:

[root@localhost ~] # mkdir / usr/local/mysql [root@localhost ~] # cd / usr/local/mysql/

Place the downloaded mysql package in the MySQL folder you created:

[root@localhost mysql] # the total amount of ll is 815000 RW / RW / R / M / R / M / R / R / M / R / M / R / R 1 root root 834560000 May 13 10:44 mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar

The MD5 code of the installed version of mysql to see if it corresponds to the one on the official website:

[root@localhost mysql] # md5sum mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar c8d062c1f74d9aab7dbdd5300b202b6e mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar

Unpack the mysql package to get several internal installation packages:

[root@localhost mysql] # tar-xvf mysql-8.0.20-1.el7.x86_64.rpm-bundle.tar mysql-community-libs-8.0.20-1.el7.x86_64.rpmmysql-community-embedded-compat-8.0.20-1.el7.x86_64.rpmmysql-community-test-8.0.20-1.el7.x86_64.rpmmysql-community-common-8.0.20-1.el7.x86_64.rpmmysql-community-devel-8 .0.20-1.el7.x86_64.rpmmysql-community-client-8.0.20-1.el7.x86_64.rpmmysql-community-libs-compat-8.0.20-1.el7.x86_64.rpmmysql-community-server-8.0.20-1.el7.x8664.rpm [root @ localhost mysql] # total amount of ll 1630004Kuwmuri. 1 root root 834560000 May 13 10:44 mysql-8.0.20-1.el7.x86villages 64.rpmMurbundle.Tarmuri RWMUR. 1 7155 31415 48822048 March 27 20:14 mysql-community-client-8.0.20-1.el7.x86Ukraine 64.rpmMurray RWMurray Rafael. 1 7155 31415 623508 March 27 20:14 mysql-community-common-8.0.20-1.el7.x86Ukraine 64.rpm RWMui RW Muhami Rafael. 1 7155 31415 8129988 March 27 20:14 mysql-community-devel-8.0.20-1.el7.x86Ukraine 64.rpm RWMI RW Muhami Rafael. 1 7155 31415 23599996 March 27 20:14 mysql-community-embedded-compat-8.0.20-1.el7.x86Ukraine 64.rpmMurray RWMurray Ruki Rafael. 1 7155 31415 4667884 March 27 20:14 mysql-community-libs-8.0.20-1.el7.x86Ukraine 64.rpmWhile RWMui RWMui Rafael. 1 7155 31415 1277128 March 27 20:14 mysql-community-libs-compat-8.0.20-1.el 7.x86 colors 64.rpm RWMI RW Muhami. 1 7155 31415 512057468 March 27 20:15 mysql-community-server-8.0.20-1.el7.x86powered 64.rpmMurray RWMui Ruki. 1 7155 31415 2353 369940 March 27 20:16 mysql-community-test-8.0.20-1.el7.x86_64.rpm

Common,libs,libs-compat,client,server in the order of installation:

Warning: mysql-community-common-8.0.20-1.el7.x86_64.rpm: header V3 DSA/SHA1 Signature Key ID *: NOKEY preparing. # # [100%] upgrading / installing... 1:mysql-community-common-8.0.20-1.e## Warning: mysql-community-libs-8.0.20-1.el7.x86_64.rpm: header V3 DSA/SHA1 Signature Key ID *: NOKEY preparing. # # [100%] upgrading / installing... 1:mysql-community-libs-8.0.20-1.el7## Warning: mysql-community-libs-compat-8.0.20-1.el7.x86_64.rpm: header V3 DSA/SHA1 Signature Key ID *: NOKEY is in preparation. # # [100%] upgrading / installing. 1:mysql-community-libs-compat-8.0.2## [100 %] warning: mysql-community-client-8.0.20-1.el7.x86_64.rpm: header V3 DSA/SHA1 Signature Key ID *: NOKEY preparing. # # [100%] upgrading / installing... 1:mysql-community-client-8.0.20-1.e## Warning: mysql-community-server-8.0.20-1.el7.x86_64.rpm: header V3 DSA/SHA1 Signature Key ID *: NOKEY preparing. # # [100%] upgrading / installing... 1:mysql-community-server-8.0.20-1.e## [100%]

Edit the / etc/my.cnf file:

Add a line at the bottom:

Lower_case_table_names=1

Initialize initialization:

[root@localhost mysql] # mysqld-- initialize [root@localhost mysql] #

Change the permissions:

[root@localhost mysql] # chown-R mysql:mysql / var/lib/mysql [root@localhost mysql] # ll / var/lib/ total dosage 8drwxr-xr-x. 4 root root 32 May 13 10:07 AccountsServicedrwxr-xr-x. 2 root root June August 3 2017 alsadrwxr-xr-x. 2 root root 274 May 13 10:14 alternativesdrwx-. 3 root root 18 May 13 10:17 authconfigdrwxr-xr-x. 2 root root June August 3 2017 bluetoothdrwxr-xr-x. 2 chrony chrony June August 4 2017 chronydrwxr-xr-x. 3 root root 17 May 13 10:06 colordrwxr-xr-x. 4 colord colord 67 May 13 10:23 colorddrwxr-xr-x. 2 root root 6 November 7 2016 dbusdrwxr-xr-x. 2 root root June August 4 2017 dhclientdrwxr-xr-x. 2 root root June August 3 2017 dnsmasqdrwxr-xr-x. 3 root root 34 May 13 10:24 flatpakdrwxr-xr-x. 2 root root June 24 2014 fprintdrwxr-xr-x. 2 root root 6 November 5 2016 gamesdrwxrwx--T. 5 gdm gdm 70 May 13 10:23 gdmdrwxr-xr-x. 2 geoclue geoclue June August 2 2017 geocluedrwxr-xr-x. 4 root root 55 May 13 02:22 gssproxydrwxr-xr-x. 2 root root June August 2 2017 hypervdrwxr-xr-x. 2 root root June August 5 2017 initramfsdrwxr-xr-x. 8 root root 90 May 13 10:07 iscsidrwxr-xr-x. 8 root root 93 May 13 10:08 libvirtdrwxr-xr-x. 2 root root 6 November 6 2016 lldpaddrwxr-xr-x. 2 root root June August 2 2017 logrotatedrwx-. 2 root root June 13 10:06 machinesdrwxr-xr-x. 2 root root 37 May 13 02:22 miscdrwxr-x---. 2 root slocate 6 November 5 2016 mlocatedrwxr-x--x. 6 mysql mysql 4096 May 13 11:05 mysql

Start the mysql service to see the service status and see the status of the Active line:

[root@localhost mysql] # systemctl start mysqld.service [root@localhost mysql] # systemctl status mysqld.service ● mysqld.service-MySQL Server Loaded: loaded (/ usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since three 2020-05-13 11:09:35 CST 8s ago Docs: man:mysqld (8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 16795 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited Status=0/SUCCESS) Main PID: 16829 (mysqld) Status: "Server is operational" CGroup: / system.slice/mysqld.service └─ 16829 / usr/sbin/ MySQL May 13 11:09:24 localhost.localdomain systemd [1]: Starting MySQL Server...5 13 11:09:35 localhost.localdomain systemd [1]: Started MySQL Server. [root@localhost mysql] #

View the initial password of the database:

[root@localhost mysql] # cat / var/log/mysqld.log | grep password2020-05-13T03:05:16.041238Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: n_t#tk.Z?7) f

Log in to the database with the initial password: change the password after:

[root@localhost mysql] # mysql-uroot-pEnter password: Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 8Server version: 8.0.20Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql > mysql > ALTER user 'root'@'localhost' identified with mysql_native_password by' 123456 question OK, 0 rows affected (0.04 sec) mysql > exitBye [root@localhost mysql] # mysql-uroot-pEnter password: Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 9Server version: 8.0.20 MySQL Community Server-GPLCopyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'C'to clear the current input statement.mysql > SELECT VERSION;ERROR 1054 (42S22): Unknown column 'VERSION' in' field list'mysql > SELECT VERSION (); +-+ | VERSION () | +-+ | 8.0.20 | +-+ 1 row in set (0.00 sec) mysql >

At this point, you can log in to the database normally, and you can find and open the remote mode on your own.

After reading this article about how the CentOS7 version installs the Mysql8.0.20 version of the database, if you think the article is well written, you can share it with more people.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report