Migration ToolsDuring testing, powerdesinger was used to convert the table structure and Navicat was used to import data. The amount of data in the production environment is large, and colleagues in the data group will choose other tools to migrate it and supplement it when the time comes. Application transformation Add mysql8.0 driver packageUse mysql-connector-java-8.0.15.jar. If it is managed by Maven, add dependencies directly: <!--MySql Driver--> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.15</version> <scope>runtime</scope> </dependency> Modify data source configurationspring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://host:ip/database?useUnicode=true&characterEncoding=utf8 spring.datasource.username=root spring.datasource.password=password Object transformation
Problem Summary Problem: Local remote connection to MySQL database, report 10060 login exception
1. The network is not accessible; 2. The service is not started; 3. The firewall is not closed; 4. The firewall port on the server is not open; 5. The port is not being monitored; 6. Insufficient permissions. I am here to troubleshoot and find out why port 3306 on the test database server is not open.
sudo vim /etc/sysconfig/iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT sudo service iptables restart sudo iptables -L -n Problem: Navicat connecting to MySQL8 results in 2059 error
mysql -uroot -ppassword #Loginuse mysql; #Select databaseALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #Change encryption methodALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password'; #Update user passwordFLUSH PRIVILEGES; #Refresh permissions Problem: Using Navicat to migrate data reports an error --> [Err] [Dtf] 1426 - Too-big precision 7 specified for 'TIME_CREATE'. Maximum is 6.
Problem: Error when inserting varchar field during data migration --> Data too long for column 'DESIGNER' at row 1
Problem: SpringBoot connects to MySQL and reports an error --> Unknown system variable 'query_cache_size'
Problem: After changing to MySQL, the Chinese characters displayed in the front-end page of the application are garbled.
Finally, it was discovered that the encoding format was set to utf-8 in the Navicat connection, which caused the imported data to appear normal in Navicat, but garbled in the database and the query results. I really checked this for a long time, but I didn't notice the reason for the tool. .
The above are the details of the problems encountered and solutions when switching from Oracle to MySQL. For more information about switching from Oracle to MySQL, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: JavaScript Basics Variables
>>: VMware ESXI server virtualization cluster
This article introduces an example of how CSS3 ca...
There are three main ways to use CSS in a page: ad...
The previous blog post talked about the Registry ...
After installing the MySQL database using the rpm...
Today someone talked to me about a website develo...
Table of contents 1. Install Docker on CentOS 7.9...
Table of contents 1. Page Layout 2. Image upload ...
1. Check whether MySQL is installed yum list inst...
All consecutive spaces or blank lines (newlines) ...
Written in front A database is essentially a shar...
Recent experience in installing mysql5.7.17 free ...
<!--[if lte IE 6]> <![endif]--> Visibl...
1. Server environment configuration: 1. Check dis...
Table of contents 1. Overview 2. Digital Enumerat...
Table of contents 1. Joint index description 2. C...