Comments (8)
This seems more like a permission issue. Jira can connect to the database but admin
user doesn't have access to the table. I would recommend following Jira MySQL documentation and create a database and a specific jira user ahead of the helm installation. Was myDatabase
created explicitly for jira? You can check permissions with:
SHOW GRANTS FOR 'admin'@'localhost';
select user from mysql.db where db='myDatabase';
You should be able to use the MySQL credentials to connect to the database from a normal MySQL client (example).
from data-center-helm-charts.
I think you're right that its a permissions issue.
mysql> SHOW GRANTS FOR 'admin'@'localhost';
ERROR 1141 (42000): There is no such grant defined for user 'admin' on host 'localhost'
mysql> SHOW GRANTS FOR 'admin'@'%';
+--------------------------------------------------------+
| Grants for admin@% |
+--------------------------------------------------------+
| GRANT USAGE ON *.* TO `admin`@`%` |
| GRANT ALL PRIVILEGES ON `myDatabase`.* TO `admin`@`%` |
+--------------------------------------------------------+
2 rows in set (0.01 sec)
mysql> select user from mysql.db where db='myDatabase';
+------------+
| user |
+------------+
| admin |
+------------+
1 row in set (0.02 sec)
I'm using the mysql chart provided by bitnami. I've tried changing the permissions for the jira user. No effect so far. By default the mysql chart creates a user with the below.
CREATE USER 'admin'@'%' IDENTIFIED BY 'admin123';
GRANT ALL PRIVILEGES ON myDatabase.* TO 'admin'@'%' WITH GRANT OPTION;
Below are the different commands I've tried. No effect
CREATE USER 'admin'@'10.1.1.%' IDENTIFIED BY 'admin123';
CREATE USER 'admin'@'10.0.0.1/16' IDENTIFIED BY 'admin123';
CREATE USER 'admin'@'jira-0' IDENTIFIED BY 'admin123';
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin123';
GRANT ALL PRIVILEGES ON myDatabase.* TO 'admin'@'10.1.1.%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON myDatabase.* TO 'admin'@'10.0.0.1/16' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON myDatabase.* TO 'admin'@'jira-0' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON myDatabase.* TO 'admin'@'localhost' WITH GRANT OPTION;
I always make sure to run the below as well.
flush privileges;
Below is my mysql configuration.
[mysqld]
default_authentication_plugin=mysql_native_password
skip-name-resolve
explicit_defaults_for_timestamp
basedir=/opt/bitnami/mysql
plugin_dir=/opt/bitnami/mysql/plugin
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
datadir=/bitnami/mysql/data
tmpdir=/opt/bitnami/mysql/tmp
max_allowed_packet=512M
bind-address=0.0.0.0
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
log-error=/opt/bitnami/mysql/logs/mysqld.log
character-set-server=UTF8MB4
collation-server=utf8mb4_bin
default-storage-engine=INNODB
innodb_default_row_format=DYNAMIC
innodb_log_file_size=2G
interactive_timeout=150000
wait_timeout=150000
from data-center-helm-charts.
@Forbzy have you tried creating a dedicated user after MySQL chart gets deployed (as per the following instructions), i.e. not rely on the user that gets created by Bitnami chart?
from data-center-helm-charts.
@bianchi2 I have. The strange thing about this is it was working the other day. I havent changed any configurations. I've even tried the root user.
from data-center-helm-charts.
I suggest to get Jira out of the equation and try to connect to the DB directly from the Pod. Something like this:
- Connect to the pod
kubectl exec -it <POD_NAME> -- bash
- Install the mysql client on the pod
apt update; apt install mysql-client
- Try to connect to the database from the pod using the client
mysql -h <HOST_WITH_DB> -u admin -Padmin123
If this connection doesn't work as well, then we definitely know that something is wrong with the DB or network Configuration. More likely DB configuration, because the error looks like permission issue.
On the other hand, if the direct connection works, but Jira keeps acting, we will know that the issue is related to the Jira.
I remember during the testing I have provisioned Confluence with the MySQL from bitnami chart, and the product was able to connect to the database. To be honest, I don't recall if I created a separate user from the product, or used the admin.
from data-center-helm-charts.
I used Bitnami chart as well. @badgersow good point, let's just use mysql client to connect and see what's going on.
from data-center-helm-charts.
I managed to get it working. It looks like there is a compatibility issue between some mysql drivers and jira docker images. I was using images tagged with ubuntu like 8.18.1-ubuntu-jdk11 with mysql driver mysql-connector-java_8.0.26-1ubuntu20.04_all.deb. They were both 20.04 ubuntu so I thought they would work. In the end I found docker images 8.13.9-jdk11 and 8.18.1-jdk11 worked with mysql driver mysql-connector-java_8.0.26-1debian10_all.deb.
from data-center-helm-charts.
Good to hear it's working @Forbzy.
from data-center-helm-charts.
Related Issues (20)
- [Suggestion] - Make securityContext in fetch-jmx-exporter configurable HOT 3
- [Suggestion] - Add resource requests and limits for init-containers HOT 1
- [Breaking - Changes] - podAnnotations don't support Datadog labels anymore HOT 5
- [Suggestion] - Handling database and/or storage recovery HOT 1
- [Suggestion] - Flag to remove setup ingress in Confluence helm chart HOT 3
- [Suggestion] - monitoring.jmxExporterCustomConfig does not work if exposeJmxMetrics is set to true HOT 1
- [Suggestion] - Security Vulnerabilities on v8.5.2 and Helm Chart Doesn't Support v8.5.3 HOT 3
- [Suggestion] - Support Kubernetes StatefulSetStartOrdinal feature gate .spec.ordinals.start HOT 5
- [Suggestion] - Upgrade to Fluentbit HOT 2
- [Suggestion] - BlockList additions to Confluence JMX Exporter config HOT 8
- [Suggestion] - Don't assign pod annotations to test pods HOT 4
- [Suggestion] - internalProxies line should be removed when there is no proxyInternalIps value in tomcatConfig HOT 9
- [Suggestion] - Make examples in the Bitbucket DC Chart more clear HOT 3
- [Suggestion] - Remove confluence shared home from synchrony volumes when creating a dedicated synchrony volume HOT 1
- [Suggestion] - Use different labels for jmx-exporter service HOT 15
- Installation problem after license HOT 3
- [Suggestion] - Use image from values.yaml for all tests containers images HOT 4
- [Suggestion] - Shared home should not be removed from synchrony [revert request for #745] HOT 2
- [Suggestion] - Add chmod to import-cert init-container script when running as non-root HOT 2
- [Suggestion] Enable HTTPS connection to the Bamboo server HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-center-helm-charts.