Installation per yum
Um das Percona yum Repo einzubinden führt man (mit root-Rechten) folgenden Befehl aus:
yum install http://www.percona.com/downloads/percona-release/redhat/0.1-6/percona-release-0.1-6.noarch.rpm
=========================================================================================================
Package Arch Version Paketquelle Größe
=========================================================================================================
Installieren:
percona-release noarch 0.1-6 /percona-release-0.1-6.noarch 16 k
Transaktionsübersicht
=========================================================================================================
Installieren 1 Paket
Gesamtgröße: 16 k
Installationsgröße: 16 k
Is this ok [y/d/N]: y
Um nun zu prüfen welche Percona-Pakete verfügbar sind: yum list | grep percona
$ yum list | grep percona
Percona-Server-client-57.x86_64 5.7.22-22.1.el7 @percona-release-x86_64
Percona-Server-server-57.x86_64 5.7.22-22.1.el7 @percona-release-x86_64
Percona-Server-shared-57.x86_64 5.7.22-22.1.el7 @percona-release-x86_64
Percona-Server-shared-compat-57.x86_64 5.7.22-22.1.el7 @percona-release-x86_64
percona-release.noarch 0.1-6 installed
Percona-Server-55-debuginfo.x86_64 5.5.60-rel38.12.el7 percona-release-x86_64
Percona-Server-56-debuginfo.x86_64 5.6.40-rel84.0.el7 percona-release-x86_64
Percona-Server-57-debuginfo.x86_64 5.7.22-22.1.el7 percona-release-x86_64
Percona-Server-MongoDB.x86_64 3.0.15-1.10.el7 percona-release-x86_64
...
Nun wird die neuste Version installiert: yum install Percona-Server-server-57
Nach erfolgreicher Installation kann der Percona-Server gestartet werden:
$ systemctl start mysqld.service
$ systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Fr 2018-08-03 22:38:13 CEST; 10min ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 2110 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 2058 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 2113 (mysqld)
CGroup: /system.slice/mysqld.service
└─2113 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
Aug 03 22:38:07 localhost.localdomain systemd[1]: Starting MySQL Server...
Aug 03 22:38:13 localhost.localdomain systemd[1]: Started MySQL Server.
Erstes Einloggen
Um sich nun auf dem Server per mysql
Befehl einloggen zu können benötigt man ein Passwort. Dieses wird automatisch bei der Installation erstellt und findet sich in der /var/log/mysqld.log
.
$ grep -i password /var/log/mysqld.log
2018-08-03T20:38:08.439204Z 1 [Note] A temporary password is generated for root@localhost: _joUd%dDm8+8
Mit diesem temporärem Passwort kann man sich erfolgreich einloggen.
mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.22-22
Copyright (c) 2009-2018 Percona LLC and/or its affiliates
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW VARIABLES LIKE "version%";
+-------------------------+----------------------------------------------------+
| Variable_name | Value |
+-------------------------+----------------------------------------------------+
| version | 5.7.22-22 |
| version_comment | Percona Server (GPL), Release 22, Revision f62d93c |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
| version_suffix | |
+-------------------------+----------------------------------------------------+
5 rows in set (0.00 sec)
allerdings wird es nun Zeit das Passwort zu ändern…
mysql> SELECT User, Host, HEX(authentication_string) FROM mysql.user;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
und das geschieht per:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 't0ps3cREt22_555';
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT User, Host, HEX(authentication_string) FROM mysql.user;
+---------------+-----------+------------------------------------------------------------------------------------+
| User | Host | HEX(authentication_string) |
+---------------+-----------+------------------------------------------------------------------------------------+
| root | localhost | 2A33334639324331344237303945354546374544383344323744454544303939344631413645313730 |