Copy the JAR file into <container>/common/lib (for Tomcat).
Create a new database
To create the MySQL database for Alfresco to use: (Version 3 will create the database for you)
Open a command prompt.
Type cd c:\alfresco\extras\databases\mysql, and press Enter.
Type db_setup, and press Enter.
At the prompt, enter the password that you use for MySQL, and press Enter. The database is prepared
Note: On Linux one can use: $ mysql -u root -p
If the setup is correct, a MySQL database is created with the following properties:
Database name is alfresco
Database user name is alfresco
Database password is alfresco
If the setup is incorrect, the following message may appear:
'mysql' is not recognized as an internal or external command
If you receive the previous error message, add the mysql command to the Windows Path variable, and try to create a MySQL database again.
To confirm that the database is created:
Log into MySQL by typing mysql -u root -p.
At the mysql prompt, type show databases;
A list of databases in MySQL displays, including one named alfresco.
NOTE: The database will contain NO TABLES. This is expected. The tables will be created when Alfresco is run for the first time.
Configuring the MySQL database
To replace the HSQL default database, you must modify values in both custom-repository.properties and custom-hibernate-dialect.properties, located within the extension folder.
To configure MySQL:
Browse to the tomcat\shared\classes\alfresco\extension\ directory.
Locate and open the following two files:
For both files:
Use â€œ#â€ to comment out any lines that refer to HSQL.
Remove the â€œ#mysql#â€ from the beginning of each line for references to MySQL.
In the custom-repository.properties, locate the following line: dir.root=...
Edit the line to point to the directory in which you want to store Alfresco data. For example: dir.root=c:/alfresco/alf_data
Note: You can either save the file in its current location (the <extension> directory), or in another directory. If you save the file in the <extension> directory, no further action is needed because the file is already pointed to by the repository-properties bean in the <extension>/customrepository-context.xml file. If you save the file elsewhere, you must point to your customized file.