How to Get and Update JIRA License String from the Database

aissa brahimi November 7, 2017

Hi,

 

We did follow the steps in your documentation and still not able to change it: here the command lines:

 

mysql> SELECT * FROM productlicense;

ERROR 2006 (HY000): MySQL server has gone away

No connection. Trying to reconnect...

Connection id:    28228

Current database: jira_7_0_11

 

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

| ID    | LICENSE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

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

| 10000 | AAABnw0ODAoPeNp9kUtv2zAQhO/8FQR6aQ8ULBl2awME6kgMoMKP1LITIOiFpdYxW4kSlpTb/PtSD6MO4uQmisud+WY+7I4NzaCmUUTD8XwymodjGic7Go3CKXlCAHOs6howWGoFxoLItdOV4WK9E9u7bZoJsm7Kn4Cbw94CWs5CElfGSeXWsgQeH1FbequhyMkvjTJ4NX3XoDpKC4l0wFtZFoYsisgguHuuod+0Wa3ENk4Xy/OV+FtrfO7eNabQpXaQn8XFSuqCq1Y9OLTqX600uba/A1WVJAM8AaYJX9w+3LDH6WzC9uniO7uf3Tz2Nmus8ka5oD0wWx3cH4kQ+MX6BNxhA/3Y26lcye4airdpHBhp1CWOj+HzEMM7bl5FOeh4rmWaZGLNotFk8mU6I/6bX57fWZo5iQ6QH2RhgWzwSRptZUeXSZP4BEmM0P3439hoxqIxKXr5e++mHY9eZAAeE2tfxxBfAlahrrvF39LtgmaDA/qxb+cT3Z9LpR3hjzmNq7IEVFoWdGDtUd7q5Vril6Yu34mTLJoetGf/BwjnEuQwLAIUWcdUkR2oof+Co3TZTqelblZ+8fYCFG78SeScXF71k0IRbsFKeQfdMdz6X02k0 |

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

1 row in set (0.30 sec)

 

mysql>

--------------------------------

 

update productlicense set license ='AAABYQ0ODAoPeNqVkT1vwjAQhnf/Cktd2iFRghpASJGKklSiAlIR2i5dXHMBQ2xHZ4ePf18nhKodO

3jx3T1+7vXdetfQnFsaRDQYT6LxJIxokq7pIAhHZNnIL8C8fDOAJh4EQUBSMBxFbYVW8ctsNaULY

Tj90HgoK32i2dmCMq5oaKmRdh33BeAR8IG2ANqxPic00VICcsEqOhfcDQFJEFgLTpmFuBXwwsALh

iTRyjJul0xCnOxQGPosoNoQrqUvlNJHVumtv5cn8PcCmSedknfqlTz4UfIdRBwhttjADZotmKhi3

lL9sqU+GaY2whx8RyeZQzedU1yyyilWV9V3t0N7OSBuXDk+Uxyycy3wcpMfd/IRyXHLlDBXSMFU6

tikyJaxO67lMRxFo+H/VyksQwvYa/UJ/jJoVCWksLC51daXGq4J5otFtkpm0/n/XwW3K9Yuqz7E1

wb5jhn4+2MR+QYswNEOMCwCFFKdBqAjXuYvYDtmV1Y/ICqk4s4MAhQpUS2EfPdZuI0fWLUWWr1/o

/W3Pg==X02hd' WHERE id= 10001;

 

 

---------- 

We still have the previous license key:

 

| 10000 | AAABnw0ODAoPeNp9kUtv2zAQhO/8FQR6aQ8ULBl2awME6kgMoMKP1LITIOiFpdYxW4kSlpTb/PtSD6MO4uQmisud+WY+7I4NzaCmUUTD8XwymodjGic7Go3CKXlCAHOs6howWGoFxoLItdOV4WK9E9u7bZoJsm7Kn4Cbw94CWs5CElfGSeXWsgQeH1FbequhyMkvjTJ4NX3XoDpKC4l0wFtZFoYsisgguHuuod+0Wa3ENk4Xy/OV+FtrfO7eNabQpXaQn8XFSuqCq1Y9OLTqX600uba/A1WVJAM8AaYJX9w+3LDH6WzC9uniO7uf3Tz2Nmus8ka5oD0wWx3cH4kQ+MX6BNxhA/3Y26lcye4airdpHBhp1CWOj+HzEMM7bl5FOeh4rmWaZGLNotFk8mU6I/6bX57fWZo5iQ6QH2RhgWzwSRptZUeXSZP4BEmM0P3439hoxqIxKXr5e++mHY9eZAAeE2tfxxBfAlahrrvF39LtgmaDA/qxb+cT3Z9LpR3hjzmNq7IEVFoWdGDtUd7q5Vril6Yu34mTLJoetGf/BwjnEuQwLAIUWcdUkR2oof+Co3TZTqelblZ+8fYCFG78SeScXF71k0IRbsFKeQfdMdz6X02k0 |

 

=================

The good key:

AAABYQ0ODAoPeNqVkT1vwjAQhnf/Cktd2iFRghpASJGKklSiAlIR2i5dXHMBQ2xHZ4ePf18nhKodO

3jx3T1+7vXdetfQnFsaRDQYT6LxJIxokq7pIAhHZNnIL8C8fDOAJh4EQUBSMBxFbYVW8ctsNaULY

Tj90HgoK32i2dmCMq5oaKmRdh33BeAR8IG2ANqxPic00VICcsEqOhfcDQFJEFgLTpmFuBXwwsALh

iTRyjJul0xCnOxQGPosoNoQrqUvlNJHVumtv5cn8PcCmSedknfqlTz4UfIdRBwhttjADZotmKhi3

lL9sqU+GaY2whx8RyeZQzedU1yyyilWV9V3t0N7OSBuXDk+Uxyycy3wcpMfd/IRyXHLlDBXSMFU6

tikyJaxO67lMRxFo+H/VyksQwvYa/UJ/jJoVCWksLC51daXGq4J5otFtkpm0/n/XwW3K9Yuqz7E1

wb5jhn4+2MR+QYswNEOMCwCFFKdBqAjXuYvYDtmV1Y/ICqk4s4MAhQpUS2EfPdZuI0fWLUWWr1/o

/W3Pg==X02hd

 

1 answer

3 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 8, 2017

I take it you're following the steps in this KB:

https://confluence.atlassian.com/jirakb/how-to-get-and-update-jira-license-string-from-the-database-441746313.html

I see in your steps that your old license had an id value of 10000 when you follow step #2 of that KB.  However for your update SQL statement for step #3 you entered a value of 10001.  That's why you still see the old license key.   Instead I believe your update statement's where clause should have been referring to the id value of 10000 instead of 10001.

Amanda Culver July 9, 2018

... and from this moment forward, Andrew, you shall be known as 'Hawk-eye'.  good catch

Like ihor_zozuliak likes this
Andreas Link March 8, 2022

@Andy Heinzer is there also a possibility to update or get the license keys of 3rd party apps? That would be helpful for us, thx for now!

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 8, 2022

@Andreas Link It's not quite as feasible to do this same thing for plugin licenses via SQL.  Mostly because these are not always stored in the same location.

But instead, I'd recommend checking out https://confluence.atlassian.com/jirakb/how-to-access-upm-rest-api-for-license-details-777021716.html as it explains an alternative means to use the REST API in order to view this kind of information from the system. 

Suggest an answer

Log in or Sign up to answer