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

Linux installs mysql8.0.12 using the glibc version

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

Share

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

1. Preface

Although it is convenient to use yum installation, there is no way to use yum sources if you do not have a public network. So we can install it using the glibc version of the installation package provided by mysql.

But before installing, be sure to delete the previous version, including all files such as / etc/my.cnf and / etc/my.cnf.d, otherwise it will cause confusion at startup. To report an error.

Software version

Linux RedHat7.4

Mysql 8.0.12

Software version linuxRedHat7.4mysql8.0.12

2. Download and decompress

Of course, if you can still get out of the public network, you can use the following command to download directly.

Wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.12-linux-glibc2.12-x86_64.tar.xz

If there is no public network, you can download it directly from the official website and transfer it to the server through other ways.

After downloading it, use the command to extract it, and I put it directly under / usr/local

The official website of mysql is also recommended to be placed directly under / usr/local.

Tar-Jxvf mysql-8.0.12-linux-glibc2.12-x86_64.tar.xz

3. Carry out installation

First add the mysql user

Groupadd mysql

Useradd-r-g mysql-s / bin/false mysql

Execute installation command

To extract the package, create a soft connection

Ln-s / usr/local/mysql-8.0.12-linux-glibc2.12-x86_64 mysql

Go to the directory of mysql

Cd / usr/local/mysql

Execute the installed command

Bin/mysqld-initialize-user=mysql

But the installation of mysql also depends on the libaio library.

Yum install libaio

To install, you only need to execute yum to install, as long as the yum source is configured first.

Execute the installation command, you will see the following information, the installation is successful, and will generate a random password, this must be kept in mind, need to be used when logging in.

4. Start mysql

Execute this command to start mysql

If you want to use your own defined configuration file, you can add the parameters you need to add to / etc/my.cnf.

If you don't add it, it starts with the default parameters of mysql.

Bin/mysqld_safe-- user=mysql &

5. Install the service

Cp support-files/mysql.server / etc/init.d/mysql.server

Copy the file under / etc/init.d

Change the name mv mysql.server mysqld.

You can then execute the service mysqld start | stop command to start and shut down mysql.

6. Change the password

Execute the command: ALTER USER 'root'@'localhost' IDENTIFIED BY' MyNewPass4!

Article source

Operation and maintenance guild: linux installs mysql8.0.12 using glibc version

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