In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to downgrade mysql8 to mysql5, hoping to add and update some knowledge. If you have any other questions you need to know, you can continue to follow my updated article in the industry information.
Recently I have been studying the use of liferay. Liferay can connect to the mysql database. The latest version of mysql installed in the computer is mysql8. So began to connect in accordance with the requirements of liferay. But after many attempts, they all reported an error: java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long.
Asked the expert, said that the version of mysql may be too high, it is recommended to lower to mysql5 and then try to connect. So began the journey of mysql downgrade.
1. Uninstall mysql8
(1) stop mysql service
Net stop mysql
(2) delete the installation directory of mysql. Many tutorials on the Internet say they should be deleted in the control panel, but I can't find mysql in my win10 system uninstall program at all. Just delete the catalogue first.
(3) delete the mysql information in the registry
The Internet said to delete the following three values, but I only found one, so I deleted the first one.
Open the registry: mode 1: enter regedit in the terminal command. Mode 2: find the regedit.exe executor C:Windows under the windows path under disk c and delete the MySQL-related folders under the following three paths.
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Application/MySQLHKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Application/MySQLHKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Application/MySQL
Add: after the above MySQL uninstall operation is completed, when a new MySQL is installed, the
The vervice already exists!
The current server installed: address where mysql was previously installed / bin/mysqld-nt MYSQL
Solution:
1. Remove the original MySQL service
Mysqld-remove MySQL
2. Re-register the MySQL service
Mysqld-install MySQL-defaults-file= "C:\ mysql-5.1.34\ my.ini"
2. Install mysql5
(1) download and decompress
(2) create a new my.ini
[mysql] default-character-set=utf8 [mysqld] port = 3306 basedir=E:\\ soft_install\\ mysql-5.7.24-winx64datadir=E:\\ soft_install\ mysql-5.7.24-winx64\\ datamax_connections=200character-set-server=utf8default-storage-engine=INNODBmax_connect_errors=100explicit_defaults_for_timestamp=true
(3) create a new data folder
(4) initialize and install mysql
Mysqld-- install mysql--defaults-file=E:\ soft_install\ mysql-5.7.24-winx64\ my.ini
(5) start
Net start mysql
Add:
(1) it is important to use double slashes in the directory of my.ini. During installation, I always use\, but keep reporting errors. Just change it to\\.
(2) mysql service cannot be started
The service did not report any errors
Solution:
You can reinitialize, restart, and empty the data folder (at the same level as bin) before initialization.
You can also delete services and re-register
Mysqld-remove mysql
3. Log in
Using cmd, there are two situations:
(1) bin/mysqld / > initialize
The password is a random password. Look for a random password in DESKTOP-UK92BAV.err under the data directory.
(2) bin/mysqld / > initialize-insecure
Do not set the password.
Change the password:
ALTER USER 'root'@'localhost' IDENTIFIED BY' new_password'
These are the details of the method of downgrading mysql8 to mysql5. Please pay attention to other related articles for more information.
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.