MySQL database other than 'alfresco'
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2007 01:05 PM
While installing Alfresco Community 2.1 from the community-tomcat package, I have been unable to successfully connect to a mysql db named anything other than "alfresco".
I have attempted to set this with the db.url variable in custom-repository.properties as such:
I have no trouble when using the same config/username/password with a database named "alfresco". Is this a limitation of alfresco or are there additional configuration steps needed to actually use a different database name?
I have attempted to set this with the db.url variable in custom-repository.properties as such:
db.username=testuserdb.password=passworddb.pool.initial=10db.pool.max=20db.driver=org.gjt.mm.mysql.Driverdb.url=jdbc:mysql://localhost/alfresco_test
where the database was created as such:create database alfresco_test;grant all on alfresco.* to 'testuser'@'localhost' identified by 'password' with grant option;grant all on alfresco.* to 'testuser'@'localhost.localdomain' identified by 'password' with grant option;
I have no trouble when using the same config/username/password with a database named "alfresco". Is this a limitation of alfresco or are there additional configuration steps needed to actually use a different database name?
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2007 01:08 PM
Some of the errors seen when connecting to "aflresco_test" database
10:08:26,433 ERROR [[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListenerorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryRepositoryBootstrap' defined in class path resource [alfresco/core-services-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Failure during rollback: org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap$1@1abfd68Caused by:org.alfresco.error.AlfrescoRuntimeException: Failure during rollback: org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap$1@1abfd68 at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:281) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155) at org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap.bootstrap(DictionaryRepositoryBootstrap.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)...

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2007 02:13 PM
Looks to me like your problem is in the two 'grant' instructions used to set up the database: it should be something like this instead:
create database alfresco_test; grant all on `alfresco_test`.* to 'testuser'@'localhost' identified by 'password' with grant option; grant all on `alfresco_test`.* to 'testuser'@'localhost.localdomain' identified by 'password' with grant option;
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2007 02:24 PM
Nice catch. You're absolutely right about the grants, but unfortunately that was a typo in my cleaning up the sql for the post. I had the db names matching during each of my failed install attempts against mysql.
Does anyone else run Alfresco with a MySQL database name other than 'alfresco'??
Does anyone else run Alfresco with a MySQL database name other than 'alfresco'??

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2007 08:44 PM
Does anyone else run Alfresco with a MySQL database name other than 'alfresco'??
Yes, me. One of my instances is called `alfresco$2_1$a` for example.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2007 04:09 AM
Hi all.
Hi can confirm and subscribe all the suggestions from sacco…
The only thing we have to do to run Alfresco2.1 with a Mysql database with the names of the schema and user different from the default ones is to modify the file custom-repository.properties as the following one:
It does not matter to modify the repository.properties file in the web-app folder because the custom-repository.properties overwrites the default configuration. So, only one file to customize in order to have Alfresco using a database with custom name for the schema and user.
The DDL for creating the database, user and grants is the following:
Just the same reported in the Alfresco documentation….
Obviously, if the mysql port is not the default one (3306), we have to specify the new port number into the db.url parameter, as the previous example. It is a common mistake not to indicate the port number when different from default.
All the best,
Sergio
Hi can confirm and subscribe all the suggestions from sacco…
The only thing we have to do to run Alfresco2.1 with a Mysql database with the names of the schema and user different from the default ones is to modify the file custom-repository.properties as the following one:
db.username=alfresco_2_1db.password=alfresco_2_1db.pool.initial=10db.pool.max=100………..db.url=jdbc:mysql://localhost:3309/alfresco_2_1
It does not matter to modify the repository.properties file in the web-app folder because the custom-repository.properties overwrites the default configuration. So, only one file to customize in order to have Alfresco using a database with custom name for the schema and user.
The DDL for creating the database, user and grants is the following:
create database alfresco_2_1;grant all on alfresco_2_1.* to 'alfresco_2_1'@'localhost' identified by 'alfresco_2_1' with grant option;grant all on alfresco_2_1.* to 'alfresco_2_1'@'localhost.localdomain' identified by 'alfresco_2_1' with grant option;
Just the same reported in the Alfresco documentation….
Obviously, if the mysql port is not the default one (3306), we have to specify the new port number into the db.url parameter, as the previous example. It is a common mistake not to indicate the port number when different from default.
All the best,
Sergio
