In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you how to upgrade APT mysql, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Before upgrading mysql to upgrade mysql, you must back up the mysql. It is also assumed that the original mysql was installed using the APT repository. If you do not install in this way, you need to replace the third-party system with the native mysql or replace the mysql installed with the deb package.
Upgrade mysql
To upgrade MYSQL using the MYSQL APT repository (that is, to replace the old version and run the new version with the original data), take the following steps:
Make sure your list of software libraries includes MySQL APT repositories.
Run the following command to make sure you have the latest package information in your MySQL APT repository.
Apt-get update
3. Note that by default you can only update the MYSQL to the version you selected when you added the APT repository. If you want to update to another version, please refer to Select a release version.
4. Upgrade mysql with the following command.
Apt-get install mysql-server
The command to upgrade other ancillary products and components is:
Apt-get install package-name
To view the ancillary products and components installed using the MYSQL APT repository, use the following command:
Dpkg-l | grep mysql | grep ii
5. After the upgrade is completed, mysql is usually restarted, and MySQL versions prior to 8.0.16 are restarted. After restart, run mysql_upgrade to check the compatibility between the old version data and the new version.
As a general rule, upgrades should go from one version to the next, not directly to the latest version. For example, upgrade from 5.5 to 5.6 and then to 5.7, instead of upgrading to 5.7 in one step.
Replace the mysql that comes with the third-party system
Note: the MySQL APT repository can only replace mysql that comes with Debian and Ubuntu, not other mysql branches, both inside and outside the repository. In order to replace these mysql branches, you must first uninstall the mysql that comes with the system, and you must obtain from the publisher how to uninstall the native mysql, backup data, and how to restore the backup data to the new mysql.
Some third-party native repository packages rely on the original native mysql packages, and MySQL APT repository packages should not work with them. These include akonadi-backend-mysql, handlersocket-mysql-5.5, and zoneminder.
Replace the third-party BYOD system with the following steps:
Back up your database.
Add an APT repository and select a release series.
Run step 4 above to replace the original version that comes with the system.
After replacing the native release of MySQL with MySQL APT repository, removing old MySQL packages from the native repository using the APT get purge, APT get remove--purge, or dpkg-P command may affect the newly installed MySQL server in a variety of ways. Therefore, do not clear the old MySQL package from the native repository package.
Recover data
Replace the mysql installed with the downloaded deb package
The Deb package from https://dev.mysql.com/downloads/ is different from the deb package from the MySQL APT repository. Mysql is installed and configured in different ways.
Here's how to replace the mysql installed with the deb package from https://dev.mysql.com/downloads/.
Back up your database.
Add an APT repository and select a release series.
Delete the old version with the following command.
Dpkg-P mysql
Install mysql with the following command
Apt-get install mysql-server
Recover the data.
Delete mysql with APT
To delete the mysql server and components installed with the MySQL APT repository, first delete the mysql server with the following command:
Apt-get remove mysql-server
Then remove the software that is automatically installed with mysql server:
Apt-get autoremove
Delete subsidiary products and components with the following command, and replace package-name with the package name you want to delete:
Apt-get remove package-name
To view the packages you installed with MySQL APT repository, use the following command:
Dpkg-l | grep mysql | available packages in grep iiMYSQL APT repository
Recommended for related study: mysql tutorial (video)
Package Name
Description
Mysql-server
Used to install the MySQL server
Mysql-community-server
MySQL server
Mysql-client
Used to install MySQL client
Mysql-cluster-community-auto-installer
Automatic installer for NDB cluster
Mysql-cluster-community-client
NDB cluster MySQL client
Mysql-cluster-community-data-node
Data nodes of NDB cluster
Mysql-cluster-community-java
Java driver of NDB Cluster
Mysql-cluster-community-management-server
Management node of NDB cluster
Mysql-cluster-community-memcached
NDB cluster memcached server
Mysql-cluster-community-server
MySQL server of NDB cluster
Mysql-cluster-community-source
Source package of NDB cluster
Mysql-cluster-community-test
Test Suite for NDB Cluster
Mysql-community-client
MySQL client
Mysql-common
MySQL database common files
Libmysqlclient20
MySQL database client library
Libmysqlclient-dev
MySQL database development file
Libmysqld-dev
MySQL embedded database development file
Mysql-testsuite
Used to install the MySQL test suite
Mysql-community-test
MySQL test suite
Mysql-community-bench
MySQL benchmark kit
Mysql-community-source
MySQL source code
Mysql-workbench-community
MySQL Workbench (not applicable to Debian platform)
Mysql-connector-python-py3
MySQL Connector/Python; for Ubuntu 16.04,18.04 and 18.10 uses Python 3.2 or later
Mysql-connector-python
MySQL Connector / Python; for Debian 8.x and Python 2.6.3 or later and for Ubuntu 16.04,18.04 and 18.10 uses Python 2.6.3 to 3.1
Mysql-router
MySQL router
Ndbclient
NDB Cluster client
Ndbclient-dev
NDB Cluster client Development Kit
The above is all the contents of the article "how to upgrade APT mysql". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.