Unofficial Content
  • This documentation is valid for:

Use GeneXus Java and MySQL in 8 steps


1. Install Sun JDK 1.4 or higher (http://java.sun.com/j2se/1.4.2/download.html )

2. Install mySQL server (version 4.0 or higher : http://dev.mysql.com/downloads/windows/installer/ or http://dev.mysql.com/downloads/mysql/)

NOTE: The MySQL Installer let's you to select the connector (JDBC driver) and the DB administrative tool (Workbench), so you can skip steps 3) and 4).

In addition, the installer allows  you to configure the server, and define the server service wakeup on each machine startup.

3. Install the JDBC driver (version 3.0 or higher : http://www.mysql.com/products/connector/). (If you download the .zip file, uncompress the .jar file inside it to a folder)

4. Install mySQL Workbench (administration tool, available in http://www.mysql.com/products/workbench/)

5. Execute mySQL Workbench and create a database, and a user.

6. Configure a GeneXus model with mySQL as DBMS. In 'DBMS Options' configure 'JDBC driver' with the value 'mySQL JDBC Driver (Type 4)', and set the properties about the server name, database name, user and password. In 'Execution Options' configure 'Sun SDK' in 'Platform', and add the JDBC .jar file to 'Classpath'.

7. Create the tables with GeneXus

8. Generate and compile you application

Notes:
-In order to use the Microsoft VM, and older drivers, you should use the following:
http://dev.mysql.com/downloads/connector/j/2.0.html


- To use NLS (national language support), use a custom URL in the DBMS Options in order to set some additional connection properties:
Example: "jdbc:mysql://myserver:3306/mydatabase?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8"

Tip: Client and server cursors - using MySQL


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant