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 > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to install mysql8.0.16 in server Centos 7. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
download
1. Select Operating System: select Red Hat, CentOS is based on Red Hat, Select OS Version: select linux 7
two。 Select RPM Bundle and click Download
Install 1. Decompress tar-xvf mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar
After decompression, mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar has the following 8 files:
-rw-r--r-- 1 7155 31415 33432660 May 3 12:38 mysql-community-client-8.0.16-2.el7.x86 May 64.rpm QQ mysql-community-devel-8.0.16-1 7155 31415 588520 May 3 12:38 RPM-2.el7.x86 May 64.rpm Mustang RW Mustang-1 7155 31415 5712552 RPM 3 12:38 RPM-2.el7.x86 May 64.rpm- Rw-r--r-- 1 7155 31415 24493344 May 312: 38 mysql-community-embedded-compat-8.0.16-2.el7.x86 May 64.rpmMuhashi May-1 7155 31415 3127296 May 312: 38 mysql-community-libs-compat-8.0.16-2.el7.x86 May 64.rpmMuhashi-1.7155 31415 2177156 RWQ-312: 38 rpm-2.el7.x86_64 .rpm-rw-r--r-- 1 7155 31415 422672748 May 3 12:39 mysql-community-server-8.0.16-2.el7.x86 May 64.rpmMurray RW Murray Ruki-1 7155 31415 114848996 May 3 12:40 mysql-community-test-8.0.16-2.el7.x86_64.rpm2, Installation
It is recommended that you uninstall all previous mysql-related packages and rpm-e-nodeps before installing them.
Install in the following order:
Rpm-ivh mysql-community-common-8.0.16-2.el7.x86_64.rpm
Warning: mysql-community-libs-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... # # [100%]
Updating / installing...
1:mysql-community-libs-8.0.16-2.el7## [100%]
Rpm-ivh mysql-community-libs-8.0.16-2.el7.x86_64.rpm
Warning: mysql-community-libs-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... # # [100%]
Updating / installing...
1:mysql-community-libs-8.0.16-2.el7## [100%]
Rpm-ivh mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm
Warning: mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... # # [100%]
Updating / installing...
1:mysql-community-libs-compat-8.0.1## [100%]
Rpm-ivh mysql-community-client-8.0.16-2.el7.x86_64.rpm
Warning: mysql-community-client-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... # # [100%]
Updating / installing...
1:mysql-community-client-8.0.16-2.e## [100%]
Rpm-ivh mysql-community-server-8.0.16-2.el7.x86_64.rpm
Warning: mysql-community-server-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... # # [100%]
Updating / installing...
1:mysql-community-server-8.0.16-2.e## [100%]
Yum install-y openssl-devel.x86_64 openssl.x86_64
Installed:
Openssl-devel.x86_64 1:1.0.2k-16.el7_6.1
Dependency Installed:
Keyutils-libs-devel.x86_64 0VOR 1.5.8-3.el7 krb5-devel.x86_64 0RU 1.15.1-37.el7_6 libcom_err-devel.x86_64 0RU 1.42.9-13.el7 libkadm5.x86_64 0Rom 1.15.1-37.el7_6 libselinux-devel.x86_64 0Rl 2.5-14.1.el7
Libsepol-devel.x86_64 0RO 2.5-10.el7
Rpm-ivh mysql-community-devel-8.0.16-2.el7.x86_64.rpm
Warning: mysql-community-devel-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... # # [100%]
Updating / installing...
1:mysql-community-devel-8.0.16-2.el## [100%]
Yum install-y perl.x86_64 perl-devel.x86_64
Installed:
Perl-devel.x86_64 4Rank 5.16.3-294.el7_6
Dependency Installed:
Gdbm-devel.x86_64 0VOR 1.10-8.el7 libdb-devel.x86_64 0RU 5.3.21-24.el7 perl-ExtUtils-Install.noarch 0RU 1.58-294.el7_6 perl-ExtUtils-MakeMaker.noarch 0Rl 6.68-3.el7
Perl-ExtUtils-Manifest.noarch 0VOR 1.61-244.el7 perl-ExtUtils-ParseXS.noarch 1RU 3.18-3.el7 perl-Test-Harness.noarch 0RU 3.28-3.el7 pyparsing.noarch 0Rl 1.5.6-9.el7
Systemtap-sdt-devel.x86_64 0 3.3-3.el7
Complete!
Yum install-y perl-JSON.noarch
Installed:
Perl-JSON.noarch 0RO 2.59-2.el7
Complete!
Yum-y install autoconf
Installed:
Autoconf.noarch 0RO 2.69-11.el7
Dependency Installed:
Perl-Data-Dumper.x86_64 0VOR 2.145-3.el7
Complete!
Rpm-ivh mysql-community-test-8.0.16-2.el7.x86_64.rpm
Warning: mysql-community-test-8.0.16-2.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing... # # [100%]
Updating / installing...
1:mysql-community-test-8.0.16-2.el7## [100%]
3. Test mysql-V
The following information is displayed indicating that the installation was successful
Mysql Ver 8.0.16 for Linux on x8634 (MySQL Community Server-GPL)
4. Modify the default configuration view configuration file location ll / etc/my.cnf
-rw-r--r-- 1 root root 1243 May 3 05:11 / etc/my.cnf
Modify common configuration 1. Modify case sensitive issues vim / etc/my.cnf
Add the following information:
# configure MYSQL case-sensitive (1-insensitive, 0-sensitive) lower_case_table_names=1
Be careful! If MySQL8.0 wants to be case-insensitive, it must modify the MySQL configuration file to be insensitive after installing MySQL before starting it. Once started, the setting is invalid, and the startup will report an error.
If it is already late, you must delete all the MySQL database files, modify the configuration file and start again.
If the data is not important, you can close the service and delete the data before performing the above operations:
Service mysqld stoprm-rf / var/lib/mysql5, initialize database mysqld-- initialize-- console6, directory authorization, otherwise start failed chown-R mysql:mysql / var/lib/mysql/7, start msyql service systemctl start mysqld
Note:
Stop command: service mysqld stop
8. Check the status of msyql service service mysqld status
● mysqld.service-MySQL Server
Loaded: loaded (/ usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2019-07-15 20:24:51 CST; 1min 18s ago
Docs: man:mysqld (8)
Http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 13374 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 13397 (mysqld)
Status: "SERVER_OPERATING"
CGroup: / system.slice/mysqld.service
└─ 13397 / usr/sbin/mysqld
Jul 15 20:24:49 iZbp109fnkszgzwbnmaoe1Z systemd [1]: Starting MySQL Server...
Jul 15 20:24:51 iZbp109fnkszgzwbnmaoe1Z systemd [1]: Started MySQL Server.
9. Check the temporary password cat / var/log/mysqld.log under / var/log/mysqld.log
2019-07-15T12:23:06.493163Z 0 [System] [MY-013169] [Server] / usr/sbin/mysqld (mysqld 8.0.16) initializing of server in progress as process 13286
2019-07-15T12:23:10.070584Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: dK3rw_EM_mjs
2019-07-15T12:23:11.237915Z 0 [System] [MY-013170] [Server] / usr/sbin/mysqld (mysqld 8.0.16) initializing of server has completed
2019-07-15T12:24:05.782446Z 0 [System] [MY-010116] [Server] / usr/sbin/mysqld (mysqld 8.0.16) starting as process 13361
2019-07-15T12:24:05.793657Z 1 [ERROR] [MY-012271] [InnoDB] The innodb_system data file 'ibdata1' must be writable
2019-07-15T12:24:05.793678Z 1 [ERROR] [MY-012278] [InnoDB] The innodb_system data file 'ibdata1' must be writable
2019-07-15T12:24:05.793704Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2019-07-15T12:24:05.793814Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2019-07-15T12:24:05.793897Z 0 [ERROR] [MY-010119] [Server] Aborting
2019-07-15T12:24:05.794672Z 0 [System] [MY-010910] [Server] / usr/sbin/mysqld: Shutdown complete (mysqld 8.0.16) MySQL Community Server-GPL.
2019-07-15T12:24:50.367615Z 0 [System] [MY-010116] [Server] / usr/sbin/mysqld (mysqld 8.0.16) starting as process 13397
2019-07-15T12:24:50.979080Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-07-15T12:24:51.199081Z 0 [System] [MY-010931] [Server] / usr/sbin/mysqld: ready for connections. Version: '8.0.16' socket:'/ var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server-GPL.
2019-07-15T12:24:51.265716Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket:'/ var/run/mysqld/mysqlx.sock' bind-address:':: 'port: 33060
10. Log in to the database with a temporary password
Mysql-u root-p + enter key
Enter the temporary password (it will not be displayed when you enter it, enter it directly)
11. Execute the following mysql command to change the password alter USER 'root'@'localhost' IDENTIFIED BY' password
Password: must contain numbers, uppercase and lowercase letters, special characters
12. Authorize remote connections
Execute the following mysql command to authorize the remote connection
To see if all users can connect remotely, execute the following commands in turn:
Show databases
Use mysql
Select host, user, authentication_string, plugin from user
Modify the root user host value so that root users can log in remotely
Update user set host = "%" where user='root'
Refresh
Flush privileges
The above is how to install mysql8.0.16 in server Centos 7. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.