cancel
Showing results for 
Search instead for 
Did you mean: 

migrating database

napata
Champ in-the-making
Champ in-the-making
I am trying to migrate an instance from a windows machine to linux. I installed alfresco on SUSE SLES ok. then uploaded the mysql database using mysqldump. However getting alfresco to change from derby to mysql gave problems. I changed hibernate and repository.properties to comment out derby bit now alfresco won't load/start properly.
If I go to localhost:8080/share I get a (slingshot)  login page but once I try to login I get an error : failed to login- remote server may be unavailable or your authentication details have not been recognised.
At first I thought this was a password issue as I changed the default password on the original site… but i have recreated the error on my mac laptop seeking to change the database to mysql with no password changes.

If I try localhost:8080/alfresco I get :
"HTTP Status 404 - /alfresco/

type Status report

message /alfresco/

description The requested resource (/alfresco/) is not available.
Apache Tomcat/5.5.23"

Is there some further change needed to the database connector or other matter I have missed?
Thanks for any help
Napata
7 REPLIES 7

zaizi
Champ in-the-making
Champ in-the-making
If you are trying to migrate from Windows to Linux, Derby to MySQL and upgrade from 2.1 to labs 3c (http://forums.alfresco.com/en/viewtopic.php?f=8&t=16026#p52530), you might be better off just exporting and importing your data through Alfresco. See http://wiki.alfresco.com/wiki/Export_and_Import.

With regards to MySQL not starting up correctly; see the Alfresco logs (alfresco.log under your installation directory) for errors and paste it here.

napata
Champ in-the-making
Champ in-the-making
Thanks for these suggestions which I will follow up … however my description may have been ambiguous … mysql works (both on suse and os x) on os x alfresco definitely connects as it populates the database, how ever tomcat won't start … I get the error :

"Dec 28, 2008 4:10:43 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart"

Googling the error is confusing as it appears this error may have many causes …
Windows is v 2.9B.
On os x the same error happens where no upgrading is involved. Alfresco works on install with derby (default) but then tomcat breaks when I try to switch to mysql ?????

any suggestions, welcome ….

Napata

mrogers
Star Contributor
Star Contributor
Just a hint. 

This error is from Catalina [Tomcat] rather than Alfresco so the error may be unrelated to upgrade.
Is there any more information logged?   Are you attempting to run more than one tomcat on the same ports?

jan
Champ in-the-making
Champ in-the-making
Hi,

I have exactly the same problem trying to migrate from Derby DB to MySQL DB. My install is Labs 3c on Ubuntu.

If you do a search on the topic with Google you'll find that there are definitely more people struggling with switching to MySQL. Tried all the suggestions I encountered (eg delete all data in  alf_data, rebuild lucene indexes, …) but nothing works.

To be honest I feel like giving up (:   So if anybody has an idea, I would be very, very grateful.

Jan

zaizi
Champ in-the-making
Champ in-the-making
Did you delete the Alf_data directory?

napata
Champ in-the-making
Champ in-the-making
What I have found is that if you fail an installation and delete the files to try again, the ports remain locked and simply trying to install another instance will fail with bindException. You have to or at least I had to reboot to free up the ports ( I thought I was escaping Windows!).
Also SUSE sles defaults to myisam and latin1 charset and unlike windows does not tell you!  For the database you need to issue the following commands in mysql prior to creating the dtabase:
1.  mysql> set storage_engine=InnoDB;
2. mysql> set names 'utf8';

These are mysql session limited options.

To help others I have submitted an amendment to db_setup.sql that will include these commands as they won't hurt anyone who has already correctly set up the parameters or who is using windows.

napata
Champ in-the-making
Champ in-the-making
I should also mention that I found that the temptation to start Alfresco with Derby to check that the install works should be resisted. The alternative is to set it up with derby to check that your install process is working, then delete, reboot and start again. This time do NOT start with derby but change all parameters to allow Alfresco to use mysql ab initio (from the begining). It may be that starting up in Derby and the switching  triggers a separate migrating process. I know on the Windows install you never start up in HSQL… well, I paid my shillings and went on the Alfresco course. It may be that some of these steps are overkill. I spent 2 weeks trying to get this move to suse sles 10 working so I do have to get back to work…. ;-). Someone else could spend a little while to check whether the never starting in Derby is really essential or whether the key issue was getting the mysql parameters correct. If you have a life (or a gf) I would suggest just following the precautionary principle.

I was at first pissed by the amount of time this took me, I thought I had learnt more about mysql than I ever wanted to know … but then I found I was able install Zope in half an hour (aced all the error messages). Zope has a horrible reputation (I have failed to correctly install zope for 4 years, and lots of people use plone as an easier) so I was rather …. pleased :-)).