Wednesday, 24 September 2014

Install and Configuration of Alfresco with MySQL Database


Here I am going to describe how to configure a MySQL database for use with Alfresco.

1>Install the MySQL database connector from mysql download site: http://dev.mysql.com/. site.

(Note-This MySQL database connector is required when installing Alfresco with MySQL. The database connector allows MySQL database to talk to the Alfresco server.)

2>Copy this JAR file into the <TOMCAT_HOME>/lib directory in Alfresco Enterprise>Tomcat .

3>Create a database named alfresco.


If you are using MySQL and require the use of non-US-ASCII characters, you need to set the encoding for internationalization. This allows you to store content with accents in the repository. The database must be created with the UTF-8 character set and the utf8_bin collation. Although MySQL is a unicode database, and Unicode strings in Java, the JDBC driver may corrupt your non-English data. Ensure that you keep the ?useUnicode=yes&characterEncoding=UTF-8 parameters at the end of the JDBC URL.

4>Go to mysql query browser and execute the user query to create username alfresco and check that user in mysql adminstatorand Set the new user's password to alfresco.

Note:create user: (for creating a user the below query need to execute)
-------------------------------------------------------------------------------------
CREATE USER alfresco@localhost IDENTIFIED BY 'alfresco';
create database alfresco DEFAULT CHARACTER SET utf8;
grant all on alfresco.* to alfresco@localhost identified by 'alfresco' with grant option;
FLUSH PRIVILEGES;

To update the password
------------------------
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;



5>Now,Open the <classpathRoot>/alfresco-global.properties.sample file.
Locate the following line:

Uncomment the following properties:
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?useUnicode=yes&characterEncoding=UTF-8

Set the other database connection properties.
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306
db.pool.max=40

6>Now Restart the Server and able to browse Alfresco.