cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco 3.4.d change to external database

itsupport
Champ in-the-making
Champ in-the-making
Hi Guys,

we have alfresco 3.4.d with build-in mysql database. currently, we would like to transfer the build-in database to a external database (mysql), and we tried hard, but the result is that after we done the following process, alfresco can not be accessed by using the same username and password.

step1. apt-get install mysql

step2. create database named "alfresco" with user "alfresco"(with full global privilieges) in new mysql server (username and password are the same as previous database).

step3. edited new mysql server's my.cnf file:   port:3305

step4. edited alfresco-global.properties:    db.url = jdbc:mysql://localhost:3305/alfresco?useUnicode=yes&characterEncoding=UTF8                                                                      


Many thanks
6 REPLIES 6

mrogers
Star Contributor
Star Contributor
Did you migrate the contents of your alfresco database to your external DB or is this a clean new install?
Is the new database on localhost?
Are there any errors in your alfresco.log ?

itsupport
Champ in-the-making
Champ in-the-making
Hi Mrogers,
Thanks for your kind reply.

Did you migrate the contents of your alfresco database to your external DB or is this a clean new install?

Yes, contents have been migrated to the new database.

Is the new database on localhost?

Yes, the new database is on localhost.

Are there any errors in your alfresco.log ?

No, i found no error in alfresco.log


Is there still somewhere something need configuring?

itsupport
Champ in-the-making
Champ in-the-making
alfresco.sh was not modified, so currently when we start tomcat by using command "/opt/alfresco-3.4.d/alfresco.sh start", not only start tomcat, but also the build-in database will be started as well.     does this info can help you analyzing?

itsupport
Champ in-the-making
Champ in-the-making
Does some one can help, Guys?

mrogers
Star Contributor
Star Contributor
All that needs to be done is the db.url needs to be changed and you have done that.

I'm assuming that your two instances of mysql are running together without interference.

Should have asked this before but is alfresco starting successfully?


Here's my script for creating the database on mysql
create database alf_threefour DEFAULT CHARACTER SET utf8;
grant all on alf_threefour.* to 'alf_threefour'@'localhost' identified by 'alf_threefour' with grant option;
grant all on alf_threefour.* to 'alf_threefour'@'localhost.localdomain' identified by 'alf_threefour' with grant option;

Here's my config from alfresco-global.properties
db.name=alf_threefour
db.username=alf_threefour
db.password=alf_threefour

#
# MySQL connection
#————-
db.host=localhost
db.port=3306
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}?useUnicode\=yes&characterEncoding\=UTF-8

itsupport
Champ in-the-making
Champ in-the-making
Thanks Mrogers,  i will try again in a new machine, and post the result here later.