Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrading from 4.1 to 4.4 - Can't Connect to MySQL Database

Shelli
Contributor
December 18, 2011

We are trying to update our version of Jira from 4.1.2 to 4.4.4 (on Linux). As part of the upgrade procedures, I have updated our <jira-home>/dbconfig.xml file to be:

<jira-database-config>

<name>defaultDS</name>

<delegator-name>default</delegator-name>

<database-type>mysql</database-type>

<schema-name>public</schema-name>

<jdbc-datasource>

<url>jdbc:mysql://our.db.server/jiradb?useUnicode=true&characterEncoding=UTF8&sessionVariables=storage_engine=InnoDB</url>

<driver-class>com.mysql.jdbc.Driver</driver-class>

<username>jira</username>

<password>xxx</password>

<pool-size>15</pool-size>

<validation-query>select 1</validation-query>

</jdbc-datasource>

</jira-database-config>

When I startup Jira, I get this error:

2011-12-19 12:16:50,501 main ERROR jira.upgrade.util.UpgradeUtils JDBC get version number failed. SQL: SELECT ps.propertyvalue FROM public.propertyentry pe, public.propertystring ps WHERE pe.PROPERTY_KEY='jira.version.patched' AND pe.ID=ps.ID

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user 'jira'@'our.db.server' for table 'propertyentry'

I logged into our db server as the jira user and ran the same query and got back the same error:

ERROR 1142 (42000): SELECT command denied to user 'jira'@'localhost' for table 'propertyentry'

However, when I run the statement without public. prepended to the table names, it works fine:

mysql> SELECT ps.propertyvalue FROM propertyentry pe, propertystring ps WHERE pe.PROPERTY_KEY='jira.version.patched' AND pe.ID=ps.ID;

+---------------+

| propertyvalue |

+---------------+

| 531 |

+---------------+

1 row in set (0.00 sec)

Why is public being used to qualify the tables? Is this something I can change?

1 answer

1 accepted

3 votes
Answer accepted
David Chan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 18, 2011

Hi Shelli,

Double check the dbconfig.xml file. There should be a parameter similar to:

  • <schema-name>public</schema-name>

Change to this to:

  • <schema-name></schema-name>

Restart JIRA and see if that helps.

Shelli
Contributor
December 19, 2011

That did the trick. Thanks!

Stefan Dangl December 14, 2014

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events