In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, what the editor shares with you is how mysql8 is downgraded to mysql5. Many people don't know much about it. Today, in order to let you know more about the way mysql8 is downgraded to mysql5, I summarized the following for you. Let's look down together. I'm sure you'll get something.
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 installed the current server installed: the 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'
After reading the appeal, do you have a general idea of what should be done when mysql8 is downgraded to mysql5? If you want to know more, 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.