Connecting Jira applications to MySQL : Error 1064

Nurul Zahrah Dzulkifly September 27, 2019

I installed MySQL , mysql-installer-community-5.7.27.0 

After installed, it showed MySQL 5.7 Command Line Client.

I tried to connect Jira to MySQL using the the below instructions but both failed. 

a) For MySQL 5.5, MySQL 5.6, and MySQL 5.7.0 to MySQL 5.7.5: 

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on <JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';
flush privileges;

b) For MySQL 5.7.6 and above, you must also include the REFERENCES permission:

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on <JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';
flush privileges;

 

Both errors are similar, Error 1064.

a) For MySQL 5.5, MySQL 5.6, and MySQL 5.7.0 to MySQL 5.7.5: Error 1064

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on <JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';flush priviledges;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>'' at line 1

b) For MySQL 5.7.6 and above, you must also include the REFERENCES permission: Error 1074

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on <JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';flush privileges;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>'' at line 1

The error started  '<JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>''

What should I set ? Please help.

Thanking in advance.

Best regards.

 

 

 

2 answers

1 vote
JP _AC Bielefeld Leader_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 27, 2019

With

<JIRADB> = jiradb

<USERNAME> = jirauser

<PASSWORD> = secretpw123

and <JIRA_SERVER_HOSTNAME> = myserver.mydomain.com

this would be:

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX ON jiradb.* TO 'jirauser'@'myserver.mydomain.com' IDENTIFIED BY 'secretpw123';

FLUSH PRIVILEDGES;

This should work.

Best

JP

0 votes
PVS
Banned
September 27, 2019

Suggest an answer

Log in or Sign up to answer