当前位置:网站首页>RPM installation percona5.7.34

RPM installation percona5.7.34

2022-06-24 11:01:00 Ashan

Introduction to the environment

operating system CentOS7.7,yum Source :CentOS-7-x86_64-DVD-1908.iso

Purpose of deployment : Test functionality and other related issues .

Installation environment preparation

take percona Of rpm Upload the collection package to the directory corresponding to the server and unzip it :

Upload here to /data/db/ Under the table of contents :

# tar xf Percona-Server-5.7.34-37-r7c516e9-el7-x86_64-bundle.tar

If it is useful on the server yum Installed mariadb Words , You can uninstall :

# rpm -aq|grep mariadb

# yum remove -y mariadb-libs-5.5.64-1.el7.x86_64

install

Decompressed 9 individual rpm Introduction of documents 、 See the official documentation for the default installation directory :

https://www.percona.com/doc/percona-server/5.7/installation/yum_repo.html

Post the content here :

rpm Package introduction :

translation :

Every RPM What's in the bag ?

Every Percona Server for MySQL RPM Packages have a specific purpose .

Percona-Server-Server-57 The package contains the server itself (mysqld Binary ).

Percona-Server-57-debuginfo The package contains the debugging symbols of the server .

Percona-Server-client-57 The package contains the command line client .

Percona-Server-devel-57 The package contains the header files needed to compile the software using the client library .

Percona-Server-shared-57 The package includes client shared libraries .

Percona Server shared compat The package includes a shared library of software compiled for older versions of the client library . This package includes the following libraries :libmysqlclient.so.12、libmysqlclient.so.14、libmysqlclient.so.15、libmysqlclient.so.16 and libmysqlclient.so.18.

Percona-Server-test-57 Package includes for MySQL Of Percona Server test suite .

Installation steps ( Must be installed in the following order ):

# rpm -ivh Percona-Server-shared-compat-57-5.7.34-37.1.el7.x86_64.rpm

# rpm -ivh Percona-Server-shared-57-5.7.34-37.1.el7.x86_64.rpm

# rpm -ivh Percona-Server-client-57-5.7.34-37.1.el7.x86_64.rpm

# rpm -ivh Percona-Server-server-57-5.7.34-37.1.el7.x86_64.rpm

There are several user-defined functions in this step , Just ignore it .

initialization :

# mysqld --initialize

Modify the user's group :

# chown mysql.mysql /var/lib/mysql -R

start-up percona5.7.34:

# service mysql restart

You can see percona5.7.34 There is only one process after getting up .

Default location for some files :

Percona5.7.34 After initialization , The temporary password will be written to the error log , That is to say /var/log/mysqld.log

# vim /var/log/mysqld.log

9dxq5jGe&Bgd This is the login password

Verify login

# mysql -uroot -p'9dxq5jGe&Bgd' -P3306

mysql> show databases;

It can be found that the login was successfully executed show databases An error is reported during the statement , An error message means that the login password must be changed , Since the initialization password is set by percona Generated temporary password , And it needs to be modified for the convenience of users .

Change user password :

mysql> set password=password('james123');

after , Log in successfully with the new password and execute show databases Statement returns normally :

additional : Password free login can be configured

# vim /etc/my.cnf

[client]

host=localhost

user='root'

password='james123'

Because the configuration of the client is modified , No need to reboot percona Effective :

Tips:

see mysql The default read configuration file :

command :# /usr/sbin/mysqld --verbose --help|grep -A1 'Default options'

-Ax: The output contains the specified number of lines after the line of the result , This refers to the following x That's ok ,A:after

As can be seen from the above figure mysql Will read /etc/my.cnf file , If the file is not in , Then read the files in the following paths in turn .

原网站

版权声明
本文为[Ashan]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/06/20210612093245013B.html