MySQL




Common

Web site: http://www.mysql.org

Create a database

Creating a database:

 <MySQL>/bin/mysql -u root -p

 mysql> create database plazma;
 mysql> use plazma;
 
 

Creating a structure of database and populate init data:

  mysql> source ñ:\Plazma\db\script\createdb\mysql\en\create_plazma_db.sql
 
or
 <MySQL>/bin/mysql --database plazma -u root -p < ñ:\Plazma\db\script\createdb\mysql\en\create_plazma_db.sql > out.txt
 




JDBC driver

You have to check the JDBC driver:


 <Plazma>/lib/jdbc/mysql/mysql-connector-java-5.0.5-bin.jar
 

You have to verify CLASSPATH for the JDBC driver in the file:


 <Plazma>/plazma.classpath
 ------------------------------------------------------
 # MySQL 
 lib/jdbc/mysql/mysql-connector-java-5.0.5-bin.jar 

 


Connect to a database

To connect you have to change properties in file <Plazma>/conf/jdbc.properties.

For example:

 # Set connection properties
 jdbc.driverClassName=com.mysql.jdbc.Driver 
 jdbc.url=jdbc:mysql://localhost:3306/plazma
 jdbc.username=sa
 jdbc.password=