In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces you to use the MySQL Yum repository handout, I hope you can supplement and update some knowledge, if you have other questions you need to know, you can continue to follow my updated article in the industry information.
Abstract
The MySQL Yum repository provides RPM packages for installing MySQL cloud servers, clients, and other components on the Linux platform. These packages can also upgrade and replace any third-party MySQL packages installed from the native software repository of the Linux distribution, if MySQL can replace them.
The MySQL Yum repository supports the following Linux distributions:
EL6 and EL7-based platforms (for example, corresponding versions of Oracle Linux,Red Hat Enterprise Linux and CentOS)
Fedora 25 and 26
Be careful
Not all of these Linux distributions support all versions of MySQL. See Select a distribution series to learn how to determine whether a Linux distribution supports a specific version.
This is a quick guide to using the MySQL Yum repository. For more information, see further reading.
Please refer to the legal statement for legal information.
For help using MySQL, visit the MySQL forum or the MySQL mailing list, where you can discuss your problem with other MySQL users.
For additional documentation on MySQL products, including translating documents into other languages, and downloadable versions of various formats, including HTML and PDF formats, see the MySQL document Library.
The file was generated at: 2017-08-23 (revision: 53609)
Catalogue
New installation steps for MySQL
Install other MySQL products and components
Upgrade MySQL using MySQL Yum Repository
Replace the local third-party distribution of MySQL
Install a MySQL NDB cluster using Yum Repository
Install other MySQL NDB cluster products and components
Further reading
New installation steps for MySQL
Be careful
The following instructions assume that MySQL; is not installed on your system using a third-party distributed RPM package. If this is not the case, follow the instructions in the native third-party distribution that replaces MySQL.
Add a MySQL Yum repository
First, add the MySQL Yum repository to the system's repository list. In this order:
Be careful
Once the release package is installed on your system, any system-level update of the yum update command (or dnf upgrade of a dnf-enabled system) will automatically upgrade the MySQL package on the system and replace any native third-party software packages if Yum finds a replacement for them in the MySQL Yum repository. For more information, see upgrading MySQL and replacing native third-party distribution of MySQL using the MySQL Yum repository.
Go to the download page of the MySQL Yum repository at http://dev.mysql.com/downloads/repo/yum/.
Select and download the distribution package for your platform.
Install the downloaded distribution package using the following command, and platform-and-version-specific-package-name replaces it with the name of the downloaded package:
Shell > sudo rpm-Uvh platform-and-version-specific-package-name.rpm
For example, for a version of an n EL6-based system, the command is:
Shell > sudo rpm-Uvh mysql57-community-release-el6-n.noarch.rpm
Select version series
When using the MySQL Yum repository, the latest version of MySQL MySQL is selected by default for installation. If this is what you want, you can skip to the next step and install MySQL using Yum.
In the MySQL Yum repository (http://repo.mysql.com/yum/), different versions of the MySQL community server series are hosted in different sublink libraries. By default, the subfeatures of the latest GA series (currently MySQL 5.7) are enabled, and subpatches for all other series (for example, MySQL 5.6 series) are disabled by default. Use this command to view all subpatches in the MySQL Yum repository and to see which of them are enabled or disabled (for dnf-enabled systems, replace yum in the command with dnf):
Shell > yum repolist all | grep mysql
No configuration is required to install the latest version of the latest GA series. To install the latest version of a specific series other than the latest GA series, disable the auxiliary devices for the latest GA series and enable the subfeatures of the specific series before running the installation command. If your platform supports the yum-config-manager or dnf config-manager command, you can issue the following command, which disables the subfeatures of the 5.7series and enables the subsystems of the 5.6series, for platforms that do not have dnf enabled:
Shell > sudo yum-config-manager-- disable mysql57-communityshell > sudo yum-config-manager-- enable mysql56-community
For dnf-enabled platforms:
Shell > sudo dnf config-manager-- disable mysql57-communityshell > sudo dnf config-manager-- enable mysql56-community
In addition to using the yum-config-manager or dnf config-manager command, you can select a series by manually editing the / etc/yum.repos.d/mysql-community.repo file. This is a typical entry: subrepository in the file:
[mysql57-community] name=MySQL 5.7 Community Serverbaseurl= http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Locate the entry for the sublink you want to configure and edit the enabled option. Specify that enabled=0 disables sub-ad material, or enabled=1 enables sub-ad material. For example, to install MySQL 5.6, make sure that you have the subtable entries described above for MySQL 5.7by enabled=0, and that enabled=1 is entered for the 5.6series:
# Enable to use MySQL 5.6 [mysql56-community] name=MySQL 5.6 Community Serverbaseurl= http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
You can only enable sublinks for one version series at any time. When multiple version series of secondary potions are enabled, Yum will use the latest series.
Verify that the correct subpatch is enabled and disabled by running the following command and checking its output (for dnf-enabled systems, use dnf to replace yum in the command):
Shell > yum repolist enabled | grep mysql
Install MySQL
Install MySQL with the following command (for dnf-enabled systems, replace yum with the command dnf):
Shell > sudo yum install mysql-community-server
This will install the package for the MySQL server and other necessary packages.
Start the MySQL server
Start the MySQL server using the following command:
Shell > sudo service mysqld start
For EL7-based platforms, this is the preferred command:
Shell > sudo systemctl start mysqld.service
You can check the status of the MySQL server using the following command:
Shell > sudo service mysqld status
For EL7-based platforms, this is the preferred command:
Shell > sudo systemctl status mysqld.service
MySQL server initialization (for MySQL 5.7 only): when the server is initially started, if the server's data directory is empty, the following occurs:
Be careful
The validate_password plug-in for MySQL is installed by default. This will require the password to contain at least one uppercase letter, one lowercase letter, one digit, and one special character, and the total password length is at least 8 characters.
The server has been initialized.
SSL certificate and key files are generated in the data directory.
The validate_password plug-in is installed and enabled.
'root'@'localhost' creates a superuser account. The super user's password is set and stored in the error log file. To display it, use the following command:
Shell > sudo grep 'temporary password' / var/log/mysqld.log
Change the root password as soon as possible and set a custom password for the superuser account by logging in with the generated temporary password:
Shell > mysql-uroot-pmysql > ALTER USER 'root'@'localhost' IDENTIFIED BY' MyNewPass4passport'
Protect the MySQL installation (MySQL 5.6only) the program mysql_secure_installation allows you to perform important actions such as setting root passwords, deleting anonymous users, etc. Always run it to make sure your MySQL 5.6installation: shell > mysql_secure_installation it is important to remember the root password you set. For more information, see mysql_secure_installation-improving MySQL installation security. Do not run mysql_secure_installation after installing MySQL 5.7because the functions of the program are already performed by the Yum repository installation.
Be careful
For EL7-based platforms: see compatibility information for EL7-based platforms.
Install other MySQL products and components
You can use Yum to install and manage the various components of MySQL. Some of these components are hosted in child patches in the MySQL Yum repository. Use the following command to list the packages available for all MySQL components of your platform from all subpatches in the MySQL Yum repository (for dnf-enabled systems, replace yum in the dnf command):
Shell > yum-- disablerepo=\ *-- enablerepo='mysql*-community*' list available
Install any package of your choice using the following command, replacing package-name with the name of the package (for dnf-enabled systems, replace yum with the command dnf):
Shell > sudo yum install package-name
For example, to install MySQL Workbench on Fedora:
Shell > sudo dnf install mysql-workbench-community
Upgrade MySQL using MySQL Yum Repository
Be careful
Before performing a MySQL update, read the instructions in upgrading the MySQL carefully. In addition to other discussed instructions, it is particularly important to back up the database before updating.
Using the MySQL Yum repository, perform an in-place update (that is, the old version replaces the old version of the old data file) for your MySQL installation by performing the following steps (they assume that you have installed the MySQL and MySQL Yum repositories or the RPM package downloaded directly from MySQL Developer Zone's MySQL download page; if not, follow the instructions for replacing the native third-party distribution of MySQL):
Select target series
By default, the MySQL Yum repository updates MySQL to the latest version in the version family selected during installation (for more information, see selecting a version family), for example, the 5.6.x installation will not be updated to 5.7.x automatic release. To update to another release series, you need to first disable child links for the selected series (by default, or through yourself) and enable child revisions for the target series. To do this, refer to the general instructions in the Select a distribution series to edit the / etc/yum.repos.d/mysql-community.repo file. "for an upgrade from MySQL 5.6 to 5.7, perform the steps shown in reverse to select a roll-out series, disable subrepository to MySQL 5.6 series, and make this MySQL 5.7 series."
As a general rule, to upgrade from one release series to another, go to the next series instead of skipping one series. For example, if you are currently running MySQL 5.5 and want to upgrade to 5.7, upgrade to MySQL 5.6 first, and then upgrade to 5.7.
important
For important information about upgrading from MySQL 5.5 to 5.6, see upgrading from MySQL 5.5 to 5.6.
For important information about upgrading from MySQL 5.6 to 5.7, see upgrading from MySQL 5.6 to 5.7.
"for important information about upgrading from MySQL 5.7 to 8.0, see upgrading from MySQL 5.7 to 8.0."
The MySQL Yum repository does not support field downgrade of MySQL. Follow the instructions for downgrading MySQL.
Upgrade MySQL upgrade MySQL and its components with the following command for platforms that do not enable dnf: shell > sudo yum update mysql-server for dnf-enabled systems: shell > sudo dnf-- refresh upgrade mysql-server or you can update MySQL by telling Yum to update everything on the system, which may take quite a long time For platforms that do not enable dnf: shell > sudo yum update for dnf-enabled systems: shell > sudo dnf upgrade restart MySQL after the Yum update, the MySQL server will always restart. Once the server restarts, run mysql_upgrade to check and possibly resolve any incompatibility between the old data and the upgraded software. Mysql_upgrade also performs other functions; see mysql_upgrade-View and upgrade the details of the MySQL table.
You can also update only specific components. Use the following command to list all installed packages for the MySQL component (for dnf-enabled systems, replace yum in the dnf command):
Shell > sudo yum list installed | grep "^ mysql"
After identifying the package name of the selected component, for platforms that do not enable dnf, use the following command to update the package and replace package-name with the name of the package:
Shell > sudo yum update package-name
For dnf-enabled systems:
Shell > sudo dnf upgrade package-name
Replace the local third-party distribution of MySQL
To obtain the latest GA version from the MySQL Yum repository (from the MySQL 5.7 series) from the third-party distribution of MySQL installed in the supported Linux platform native software repository, follow these steps:
Backup database
To avoid data loss, always back up the database before attempting to replace the MySQL installation with the MySQL Yum repository. "for information about how to back up a database, see backup and restore."
Add a MySQL Yum repository
Follow the instructions in add MySQL Yum Repository to add the MySQL Yum repository to the system's repository list.
Replace native third-party distribution with Yum updates or DNF upgrades
By design, when you execute the yum update command (or a dnf upgrade of a dnf-enabled system), the MySQL Yum repository will replace your native third-party MySQL from the MySQL Yum repository with the latest version of GA (currently from the MySQL 5.7 series) or yum update mysql-server (or dnf upgrade mysql-server for dnf-enabled systems).
After you update MySQL with the Yum repository, applications compiled with older versions of the shared client library should continue to run. However, if you want to recompile the application and dynamically link it to the updated library, see upgrading shared client libraries for some special considerations.
Notes
For EL7-based platforms: see compatibility information for EL7-based platforms.
If you have a third-party distribution of MySQL that you downloaded and installed from a non-local repository (for example, from MariaDB or Percona), be sure to follow the instructions given in the MySQL server reference manual.
Install a MySQL NDB cluster using Yum Repository
Notes
The following instructions assume that the MySQL server and MySQL NDB cluster are not installed on your system; if this is not the case, delete the MySQL server or MySQL NDB cluster, including all its executables, libraries, configuration files, and data directories before continuing. However, there is no need to delete distributions that may be used to enable MySQL Yum repositories on the system.
The NDB Cluster SQL node package is dependent on the Perl Class::MethodMaker module. If the EPEL (additional package for Enterprise Linux) repository is enabled on your system, Yum can handle this dependency; see the instructions here on how to enable the EPEL repository.
The MySQL Yum repository supports the installation of MySQL NDB Cluster, only for version 7.5.6 and later, and for EL6 and EL7 platforms only. For other ways to install NDB Cluster, see install NDB Cluster 7.3,7.4 on Linux, or install NDB Cluster 7.5 on Linux, depending on the release family you are using.
Add MySQL Yum Repository for MySQL NDB clusters
Follow the steps in add MySQL Yum Repository to add the MySQL Yum repository to the system's repository list. If you have already performed the previous steps, ensure that you have the latest version of the release package by running the following command, for platforms that do not have dnf enabled:
Shell > sudo yum update mysql57-community-release
For dnf-enabled systems:
Shell > sudo dnf-- refresh upgrade mysql57-community-release
Select MySQL NDB Cluster Subrepository
In the MySQL Yum repository (http://repo.mysql.com/yum/), the MySQL community server and the MySQL NDB cluster are hosted in different subsites. By default, the subfeatures of the latest GA series of MySQL servers are enabled and the subfeatures of MySQL NDB Cluster are disabled. To install a NDB cluster, disable the subsites of the MySQL server and enable the subsites of the NDB cluster. If your platform supports the yum-config-manager or dnf config-manager command, you can do this by issuing the following command, which disables child links for the MySQL 5.7 series and enables the command for MySQL NDB Cluster 7.5, for platforms that do not have dnf enabled:
Shell > sudo yum-config-manager-- disable mysql57-communityshell > sudo yum-config-manager-- enable mysql-cluster-7.5-community
For dnf-enabled platforms:
Shell > sudo dnf config-manager-- disable mysql57-communityshell > sudo dnf config-manager-- enable mysql-cluster-7.5-community
In addition to using the yum-config-manager or dnf config-manager command, you can select a sublink by manually editing the / etc/yum.repos.d/mysql-community.repo file. This is a sample entry for MySQL 5.7 subrepository in the file:
[mysql57-community] name=MySQL 5.7 Community Serverbaseurl= http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
To install NDB Cluster 7.5, you must disable the MySQL 5.7 subdirectory by setting the above subprocess table items through enabled=0 and enable enabled=1 by making it a NDB Cluster 7.5 subdirectory:
[mysql-cluster-7.5-community] name=MySQL Cluster 7.5 Communitybaseurl= http://repo.mysql.com/yum/mysql-cluster-7.5-community/el/6/$basearch/enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
After saving the changes to the file, verify that the correct child patch is enabled by running the following command (for dnf-enabled systems, use dnf to replace yum in the command):
Shell > yum repolist enabled | grep mysqlhands mysqlMuoclusterMel 7.5 Mutual communitycontrol x86 "64" MySQL Cluster 7.5 MySQL Tools Community 18 "mysqlus connectorsMutual communityplaza x86" 64 MySQL Connectors Community 31 "mysqlCorp toolscommunityUniverse x86" 64 MySQL Tools Community 33
The subfeatures of NDB Cluster 7.5 (Community Edition) are now enabled. There are also other subpatches in the list that are enabled by default for the MySQL Yum repository.
Install the MySQL NDB cluster
To minimize the installation of MySQL NDB clusters, follow these steps (for dnf-enabled systems, replace yum in the command with dnf):
Install the executable file for the management node:
Shell > sudo yum install mysql-cluster-community-management-server
Install the executable file for the data node:
Shell > sudo yum install mysql-cluster-community-data-node
Install the components of the SQL node:
Shell > sudo yum install mysql-cluster-community-server
After the installation is complete, follow the steps in starting the MySQL server to start and initialize the SQL node.
To configure and start a MySQL NDB cluster, see the initial configuration of NDB Cluster for how to configure the initial startup of MySQL NDB Cluster and NDB Cluster for the first time.
Be careful
For EL7-based platforms: see compatibility information for EL7-based platforms.
Install other MySQL NDB cluster products and components
You can use Yum to install various components of MySQL NDB Cluster and other products from the MySQL Yum repository. To do this, assume that you already have a MySQL Yum repository in the system's repository list (if not, follow steps 1 and 2 to install the MySQL NDB cluster using Yum Repository) and follow the same steps in installing other MySQL products and components.
Be careful
Known issue: currently, when you install the test suite package (mysql-cluster-community-test), you do not automatically install all the components required to run the MySQL NDB Cluster test suite. Before running the test suite, use yum install (or dnf to enable the dnf installation of the system) to install the following software packages:
Mysql-cluster-community-auto-installer
Mysql-cluster-community-management-server
Mysql-cluster-community-data-node
Mysql-cluster-community-memcached
Mysql-cluster-community-java
Mysql-cluster-community-ndbclient-devel
After reading the above handouts on using MySQL Yum repository, I hope it can give you some help in practical application. Due to the limited space in this article, it is inevitable that there will be deficiencies and need to be supplemented. If you need more professional answers, you can contact us on the official website for 24-hour pre-sales and after-sales to help you answer questions at any time.
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.