Changes in the database configuration between 4.2 and 5.2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Changes in the database configuration between 4.2 and 5.2

Roman Muntyanu
Hello,

  Were there any database configuration changes between XWiki 4.2 and 5.2?
  I'm trying to upgrade our XWiki installation, as usually configured hibernate.cfg.xml to point to local MySQL database (name='xwiki_52_innodb_utf8'):

    <property name="connection.url">jdbc:mysql://localhost/xwiki_52_innodb_utf8?useServerPrepStmts=false&useUnicode=true&characterEncoding=UTF-8</property>
    <property name="connection.username">xwiki</property>
    <property name="connection.password">xwiki</property>
    <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
    <property name="dbcp.ps.maxActive">20</property>
    <mapping resource="xwiki.hbm.xml"/>
    <mapping resource="feeds.hbm.xml"/>
    <mapping resource="activitystream.hbm.xml"/>
    <mapping resource="instance.hbm.xml"/>

  But when XWiki starts it fails with an error:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'xwiki'@'localhost' to database 'xwiki'

  Is it still possible to specify database name different than xwiki?

Regards,
  Roman
Reply | Threaded
Open this post in threaded view
|

Re: Changes in the database configuration between 4.2 and 5.2

Roman Muntyanu
Creating DB with name 'xwiki' and modifying hibernate.cfg.xml accordingly works, but that's a workaround.
Still want to give custom names to XWiki database (to differentiate versions on upgrades)
Reply | Threaded
Open this post in threaded view
|

Re: Changes in the database configuration between 4.2 and 5.2

Guillaume Fenollar-2
Hello,

Have you tried to look at "xwiki.db" property in xwiki.cfg?

#-# [Since 1.6M1]
> #-# Force the database name for the main wiki.
> # xwiki.db=xwiki


Usually, when I want to change my main wiki name, I change both variables
(in hibernate, and xwiki.cfg), and it works without any troubles.

Good luck

Guillaume


2013/10/26 coldserenity <[hidden email]>

> Creating DB with name 'xwiki' and modifying hibernate.cfg.xml accordingly
> works, but that's a workaround.
> Still want to give custom names to XWiki database (to differentiate
> versions
> on upgrades)
>
>
>
> --
> View this message in context:
> http://xwiki.475771.n2.nabble.com/Changes-in-the-database-configuration-between-4-2-and-5-2-tp7587730p7587731.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Changes in the database configuration between 4.2 and 5.2

Thomas Mortagne
Administrator
The difference between 4.2 and 5.2 is that XWiki is not always in
multiwiki mode without mean if you want to have a different name for
the main wiki database you have to set xwiki.db property in xwiki.cfg.
Only changing the hibernate configuration was only working in single
wiki mode.

On Thu, Oct 31, 2013 at 3:40 PM, Guillaume Fenollar
<[hidden email]> wrote:

> Hello,
>
> Have you tried to look at "xwiki.db" property in xwiki.cfg?
>
> #-# [Since 1.6M1]
>> #-# Force the database name for the main wiki.
>> # xwiki.db=xwiki
>
>
> Usually, when I want to change my main wiki name, I change both variables
> (in hibernate, and xwiki.cfg), and it works without any troubles.
>
> Good luck
>
> Guillaume
>
>
> 2013/10/26 coldserenity <[hidden email]>
>
>> Creating DB with name 'xwiki' and modifying hibernate.cfg.xml accordingly
>> works, but that's a workaround.
>> Still want to give custom names to XWiki database (to differentiate
>> versions
>> on upgrades)
>>
>>
>>
>> --
>> View this message in context:
>> http://xwiki.475771.n2.nabble.com/Changes-in-the-database-configuration-between-4-2-and-5-2-tp7587730p7587731.html
>> Sent from the XWiki- Users mailing list archive at Nabble.com.
>> _______________________________________________
>> users mailing list
>> [hidden email]
>> http://lists.xwiki.org/mailman/listinfo/users
>>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users



--
Thomas Mortagne
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Changes in the database configuration between 4.2 and 5.2

Roman Muntyanu
Thanks, guys
I'll try it on next upgrade to 5.3 :)