Weka connect the database around a lot of circles, always because of some messy reasons not connected. The detailed process is now written to save time for those who use it later.
1. Configure the environment (by default, the JDK is already configured).
Create a new Lib directory under the Weka installation directory and copy the database driver for JDBC (jar package) into the \lib
Variable: Weka_home value: D:\Weka-3-6
Add Variable: ClassPath value:%weka_home%\lib\mysql-connector-java-5.0.4-bin.jar;
2. Unzip the Weka.jar with the compression software (recommended backup first), change the weka\experiment inside the Databaseutils.props file:
Jdbcdriver=jdbcdriver=com.mysql.jdbc.driver
Jdbcurl=jdbc:mysql://localhost:3306/myweka (Weka is the default database name that is displayed when connecting to the database, can be arbitrarily taken)
3. Package the changed files. The simplest way to do this is to use the compression software to package the previously extracted three folders into a zip format file. Then change the zip suffix name to jar and replace the packaged file with the previous one.
4. Connect to the database.
Weka Connection Database Method (MySQL)