I make a project of web in JSP for displaying my mysql database in web. I used JSF, GlassFish server 4.1 and mysql-5.6.24 for my project. mysql is on port 3306 and GlassFish receives HTTP request on port 8080 but my project displays this error message to me in a web browser.
"Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused: connect."
1527 port is for Derby and i am using mysql which is on port 3306 why it shows me this port error with which mysql didn't any concern 1527 is for Derby.
Related
I installed zabbix 4.0 in centOs 7 and configured it to connect to remote mysql.
But log file says that it can not connect to DB.
I tried to telnet to DB machine and I was OK!
telnet 10.1.13.33 3306
Trying 10.1.13.33...
Connected to 10.1.13.33.
here is my /etc/zabbix/zabbix_server.conf:
SourceIP=10.1.9.140
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
DebugLevel=5
PidFile=/var/run/zabbix/zabbix_server.pid
SocketDir=/var/run/zabbix
DBHost=10.1.13.33
DBName=zabbix
DBUser=zabbix
DBPassword=******************
DBPort=3306
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
Timeout=4
AlertScriptsPath=/usr/lib/zabbix/alertscripts
ExternalScripts=/usr/lib/zabbix/externalscripts
LogSlowQueries=3000
When starting zabbix, in /var/log/zabbix/zabbix_server.log there is a line like this:
[Z3001] connection to database 'zabbix' failed: [2003] Can't connect to MySQL server on '10.1.13.33' (13)
database is down: reconnecting in 10 seconds
By default, Zabbix server does not understand which IP to be listened. So you have to also mention your ListenIP in /etc/zabbix/zabbix_server.conf:
ListenIP=<your_ip>
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.
Every time I try to connect to my mySQL on mysql workbench, it gives me this error message saying:
Your connection attempted failed for user 'root' from your host to server at http:x.x.x.x:3306: Cannot open SSH Tunnel:Error connecting SSH tunnel:Error Connecting to SSH server Error 11004 get addrinfo failed
I think you could get solution here: http://quintagroup.com/services/support/tutorials/mysql-linux
or follow this steps:
Open putty and accept the certificate of the server
hostname should be localhost ( in order to use local socket and not http conection)
local port should be something like 33010 not 3306
local port is the conection back port used by the plink and has nothing to do with mysql ports
I have configured my system to connect to the SQL Server 2008, I am running under windows server 2008, and I made the following:-
Enable TCP/IPon my SQL Server.
Activate and enable the 192.168.1.20 for the SQL Server.
Add two inbounds rules for the 1433 post on the firewall and the sqlserver.exe.
But when I tried to connect the database I got the following error:-
The TCP/IP connection to the host 192.168.1.20, port 1433 has failed.
Error: "connect timed out. Verify the connection properties, check
that an instance of SQL Server is running on the host and accepting
TCP/IP connections at the port, and that no firewall is blocking TCP
connections to the port.".
When I typed the following:
telnet 192.168.1.20
it gave me
Connecting To 192.168.1.20...Could not open connection to the host, on port 23:
Connect failed
So what might be the problem?
the telnet command is wrong, try
telnet 192.168.1.20 1433
You didn't mention about outbound rules. You need to add the inbound + outbound rules on your machine (in the firewall) and on SqlServer machine.
I am new play framework. I am trying to connect to mysql database on linux server. it is not working !!
I am getting an error:
A database error occured : Cannot connected to the database, Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
anyway I am able to connect linux server through my MySQL Work bench.
application.mode=dev
%prod.application.mode=prod
jpa.ddl=update
db.url=jdbc:mysql://<ipaddress>:3306/<database>?useUnicode=false&characterEncoding=ISO-8859-1&connectionCollation=utf8_swedish_ci
db.driver=com.mysql.jdbc.Driver
db.user=<user>
db.pass=<password>
ensure that you have the correct ip address and port nunmber for mysql in the config file (as well as the correct username/pwd).
you can check if mysql is listening on the port (try netstat -an | grep 3306).