In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to change the deployment database in DataGear. The content of the article is of high quality. Therefore, Xiaobian shares it with you as a reference. I hope you have a certain understanding of relevant knowledge after reading this article.
1. Manually initialize the database
Refer to the Derby database initialization SQL scripts (datagear-management/src/main/resources/org/datagear/management/ddl/datagear.sql) built into the DataGear source repository (https://gite.com/datagear/datagear.sql), write new database initialization SQL scripts, and execute them.
If you are installing DataGear for the first time, you need to write all the SQL scripts, and if you are upgrading DataGear, you only need to write the upgrade SQL scripts from the old version to the new version.
Tip: The DATAGEAR_REPLACEREGEX function and its associated SQL statements in the initialization script can be ignored. They are only used for upgrading older versions of data and are not used in the program.
2. Manually update the database version number table
Manually execute the following SQL statement to update the current DataGear version number:
UPDATE DATAGEAR_VERSION SET VERSION_VALUE ='current version number '
Note: The current version number in the SQL statement above should be replaced with the actual DataGear version number, for example: 2.3.0
3. Configure database connection
Configure the new database connection by adding datasource.driverClassName, datasource.url, datasource.username, datasource.password configuration items in config/application.properties.
For example, for a MySQL database, the configuration would look like this:
datasource.driverClassName=com.mysql.cj.jdbc.Driverdatasource.url=jdbc:mysql://localhost:3306/datageardatasource.username=datageardatasource.password=datagear
4. Introduction of database drivers
Modify the DataGear startup script to introduce the new database JDBC driver library.
For Linux systems, the startup.sh startup script should be modified, for example, to:
JAVA_OPTS=$JAVA_OPTS
modified to
JAVA_OPTS=$JAVA_OPTS -Xbootclasspath/a:lib/mysql-connector-java-8.0.23.jar
For Windows systems, the startup.bat startup script should be modified, for example, to:
java -jar datagear-2.3.0.jar
modified to
java -Xbootclasspath/a:lib/mysql-connector-java-8.0.23.jar -jar datagear-2.3.0.jar
5. Start
Execute the startup script to start DataGear.
Note: DataGear-2.3.0 and above are required to change the database. There are database compatibility problems with older versions of the program.
About how to change the deployment database in DataGear to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.
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.