When I try to connect WhereHows backend to MySQL DB in Docker environment I am getting following error message (I checked IP, Username and Password and all 3 are good):
1) Error in custom provider, Configuration error: Configuration error[Cannot connect to database [wherehows]]
At the same time, WhereHows web is connecting without any problem.
Docker version is 17.12.0-ce and I am using following images:
wherehows/backend
wherehows/web
wherehows/mysql
This is my config file - /backend-service/conf/application.conf
# connection to wherehows mysql database
db.wherehows.driver = com.mysql.jdbc.Driver
db.wherehows.url="jdbc:mysql://localhost/wherehows?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false"
db.wherehows.username="wherehows"
db.wherehows.password="wherehows"
Related
I have an instance of Apache NiFi running on the windows machine. I have failed to connect it with the MySQL database which is running on localhost and is accessible from any host.
I have attached the configurations of the connection
I tried to change the class name from com.mysql.jdbc.Driver to com.mysql.cj.jdbc.Driver and vice-versa without success, I also tried to change the Database connection URL port from 3306 t0 33061 and vice-versa also without any success.
on the bulletin board am getting the error "No suitable driver for the given Database Connection URL: No suitable driver for the given Database Connection URL and the status is stuck on enabling even after restarting the apache NiFi.
Please assist am stuck in here.
ps: I don't have password set for the root user of my database
typo in url - you have jbds instead of jdbc
I have an AWS Lightsail instance running the Bitnami configuration for Ubuntu 16.04.5 LTS and PHP7.
I can connect the the MySQL database using phpMyAdmin on the server via an SSH Tunnel. But when I try to configure DataGrip for SSH access to the database I receive the error message "Host '127.0.0.1' is not allowed to connect to this MySQL server".
When I remove "localhost" from the host field of the General tab then I receive the error "ExecutionException: SSH: Unable to find host/port in URL".
The following test and response appears to show a successful connection to the port:
cat < /dev/tcp/###.###.###.###/22
SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.6
I'm using keypair auth. Both the user name and the Private key file are the same used for the ssh tunnel when running phpMyAdmin.
Not sure what to try next. Any help appreciated.
I have created SpringBoot application which connectes to the remote database mysql. I test it with two remote db connection: one has a dynamic IP, the second one has a permanent IP - it's a hosting.
Running locally:
When I try to run application locally (connection to DB with permanent IP), straightforward from Intellij everything works properly - in my browser I can see the application.
When I try to run the application with dynamic IP - I need to provide the host name instead of IP, the application throws:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Caused by: java.sql.SQLException: null, message from server: "Host 'HomeGateway' is not allowed to connect to this MySQL server"
Running on server:
When I try to run it on server eventhough I provide the connection to the host with dynamic IP or with pernament IP it also throws:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Caused by: java.sql.SQLException: Access denied for user 'root'#'localhost' (using password: YES)
The application.properties file looks like - the connection with database with dynamic IP:
# REMOTE DATABASE
spring.datasource.url = jdbc:mysql://modraszka.sth.sth:3336/test3?autoReconnect=true&useSSL=false
spring.datasource.username = root
spring.datasource.password = password
I must add that when the appication has been deployed at server, at the same server is located database - this one which has dynamic server - modraszka.sth.sth.
Summary:
Whenever I want to run the application from server which has connection to remote DB it always throws fails even when I want to connect to the DB which is located on the same server as my application. I also tried to run application with db properites connection as: localhost:3306/test3 -> but it also failed.
I have an Tomcat 7 application on openshift and I have added a MySQL cartridge. I have a problem connecting to that database using MySQL workbench.
I have added all the necessary parameters like hostname, username, password and SSH key, I have tested the connection and I get no errors. But when I try to connect to the db I get the following error:
Your connection attempt failed for user 'adminxxxx' from your host to server xx.xxx.xxx.xxx:3306:
Tunnel error: Remote connection to xx.xxx.xxx.xxx:3306 failed: IOError('open SSH tunnel timeout',)
What can I do to fix this? Connecting to the db is a big part of the application.
openshift scaled app with port forward - Unable to access mysql on localhost.
I have a simple php scaled app, I was able to setup the port forwarding for myapp. I can see that the 127.0.0.1:37731 is pointing to the openshift mysql gear.
But when I try to access mysql on command line or using mysql workbench, I am getting a
"Connected to MySQL at 127.0.0.1:37731 with user adminXXXXX", connection parameters are incorrect error.
I am ubuntu. "adminXXXXX:#127.0.0.1:37731:" is the connection string when I copy it from the workbench.
Try specifying the host separately.
E.g. after port forwarding, I entered
mysql --host=127.0.0.1:40793
and got
ERROR 2005 (HY000): Unknown MySQL server host '127.0.0.1:40793'
but this worked:
mysql --host=127.0.0.1 --port=40793