Connecting Coldfusion 9 with MySql 5 on Ubuntu 9.10 - mysql

I've recently set up a Ubuntu 9.10 server with a LAMP configuration and then installed Coldfusion 9 Development version as well.
I've got phpMyAdmin working, so MySql and PHP are fine, and I can serve coldfusion pages, but if I cannot verify my Coldfusion datasource. I get the following error:
Could not create connection to
database server. Attempted reconnect 3
times. Giving up.
With the top of the stack trace showing
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to
database server. Attempted reconnect 3
times. Giving up.
These are my settings for the datasource in the Coldfusion administrator
JDBC URL jdbc:mysql://192.168.1.19:3306/dbname
Drive class com.mysql.jdbc.Driver
Driver name ConnectorJ 5.1.7
And I know the username and password are correct as they're the same ones I use for phpMyAdmin. Does anyone have any ideas why it's not working?

I'm using almost the same configuration on few boxes and have no such problems, so it looks like you are misconfiguring the datasource.
Are you trying to create the dsn with "MySQL (4/5)" driver? I'm not sure how to read your settings string properly. Is that IP is your localhost? If yes, why not try to use the localhost for server name.

It's a permissions problem. The IP needed to be 192.168.1.19 in the DSN setup in the administrator, but that didn't fix it alone.
I also created a 'temp' MySQL user based on a post found here: http://www.linuxquestions.org/questions/showthread.php?p=4039359#post4039359
And used that instead, it worked.

Try using 127.0.0.1 as the MySQL server address in your DSN configuration

Related

Power BI not connecting to MySQL

I am trying to connect Power Bi (Desktop version) with my online amazon mysql database. It demands for following information once you try to establish connection
Server: server ip
Database: database name
Username: mysql username
Password: mysql password
First time I received a bit lengthy error, which was because of unavailability of mysql-connector-net-6.6.5.msi. So I followed this link to solve the issue
Microsoft Power BI connect to mysql
After installing mysql-connector I am facing another error.
Whats wrong? One of my mates has successfully connected using the same credentials that I am using.
Okay, I just figured this out for myself. I'm able to connect directly to a MySQL database on port 3306. As I understand, it would be more secure to go through an SSH tunnel, but this doesn't work yet with Power BI.
So here are instructions for connecting directly:
First, let's make sure that everything besides the PowerBI connection is working.
1) Download and install the correct version of the MySQL/Net Connector. Right now, version 6.6.5 is the one that works. But from other forums, and from within PowerBI itself, I linked to other versions that did not work. (You will know it isn't working, because you probably won't be able to even open Get Data/MySQL Database/Connect.)
2) See if you can connect remotely to your database through some well established utility like MySQL workbench. If you can't,
- look at ports on the remote server. Here's a cool utility to check ports&IPs: http://www.yougetsignal.com/tools/open-ports/
- Check the permissions of the DB user. Realize that they may be affiliated with an IP address: 'username'#'ipaddress'. So that user can only connect for a particular IP.
- Check the bind address setting. In newer versions of mariadb, it should probably be commented out. I'm not sure about older version and pure mysql.
- other troubleshooting.
So after that's working, here are the settings which worked for me in MySQL:
go to Get Data/MySQL database/connect
Server: ipaddress:3306 (include ":port#")
Database: dbname
PowerBI interface. Select "Database" instead of "Windows"
Make sure you select Database instead of Windows.
Good luck.
Just a small tip. If you haven't already, restart the machine you just installed the connector on. I had to restart before it started working.
My solution for this was to add the port number to the server name/ip
eg. 192.168.0.1:4664

MySQL Connector/ODBC MS Access won't connect

I have a MS Access front end that connects to a MySQL database. When the computer running Access is on the same network it works fine but trying to do it remotely is not working.
I can connect with MySQL workbench so I know the port forwarding is setup correctly.
I can test the connection from the connector panel and it says its successful.
When I click OK the connector box disappears, Access freezes for a while, then the box reappears.
For troubleshooting purposes I also tried to connect over a VPN which produced the same results. Using the ip given by the vpn. I've also tried the ip of the host network.
Connection String:
[ODBC]
DRIVER=MySQL ODBC 5.2 ANSI Driver
UID=kristim
DFLT_BIGINT_BIND_STR=1
PORT=3306
DATABASE=awanacontrol
SERVER=****.****.com
It seems to have been a simple issue of starting from the beginning. I was trying to change the address of the already linked tables. In order to get it to work I needed to be sure to delete all linked tables and link them again with a new ODBC string with the DNS name.

JDBC connection issue ubuntu and PHP Storm

Im trying to connect to the database using DB navigator in PHP Storm.
I can already connect to my database which is a VPS on digitalocean with php and PDO using localhost as the host and the username and password setup through PHPmyadmin. I don't understand why that works since my database is stored on Digital Oceans VPS but it works, i can write to and from the database no problem and access my database at www.mywebsite/phpadmin
normally when localhosts works it means i have LAMP installed on my local machine but i don't and when i worked previously with shared hosting for another site the host was the ip address.
Anyway i didn't worry about it since it works for my PHP connection but now im trying to use DB navigator with PHPstorm and it needs to setup the database connection. since im using the same username and password that works for php connection to the database i assume that is correct.
I have installed the driver library and selected the .com.mysql.jdbc.Driver as the driver.
for URL which i assume must be host i have tried the following:
pretend droplet ip = 123.456.789
pretend website is: www.mywebsite.com
jdbc:mysql://localhost:3306
jdbc:mysql://123.456.789:3306
jdbc:mysql://mywebsite.com:3306
jdbc:mysql://www.mywebsite.com:3306
None of these work and all say no packets received. I also tried with the data source option in php designer with the same results. Anyone know what the correct connection string is, maybe i have the string structured wrong, im new to ubuntu and these VPS systems, i have ssh access also if that matters?

Can't connect Coldfusion 10 to mysql 5

I am trying to setup a test coldfusion server running on my home PC (Windows 8 Pro 64 bit). I have Coldfusion 10 installed, and mysql 5.6.10 working as well. When I try to connect them, I am getting the following error:
Connection verification failed for data source:
mydbcom.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to database server. Attempted reconnect 3 times.
Giving up.
The root cause was that:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
I've looked all over the place, and I can't seem to figure out what I need to do to fix it.
Thanks in advance.
What's your DSN definition in CF Admin look like? Did you create a MySQL user that has access to that database, which you then used in your CF Admin DSN connection?
EDIT:
Yes, you should never connection as "root" by practice. Create a new user and give them the correct permissions to your database. I've got some instructions here if you need them.
http://iknowkungfoo.com/blog/index.cfm/2008/6/16/The-ACME-Guide-64bit-Ubuntu-804-Edition-Part-3
The trick for me was to type in the IP address for the server address when adding a new CF ADMIN DSN entry. Using local, localhost or 127.0.0.1 for the server address did not work for me.

Connecting Funambol to MySQL on remote host

I am setting up Funambol 8.7 on a Linux host (using Amazon AWS). I need to connect to a MySQL datbase that is hosted on a different server.
Per the administration guide I went ahead and downloaded the mysql connector and placed the jar in /opt/Funambol/tools/jre-1.6.0/lib/ext. I changed the install.properties file as follows:
dbms=mysql
jdbc.classpath=/opt/Funambol/tools/jre-1.6.0/jre/lib/ext/mysql-connector-java-5.1.14-bin.jar
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://myserver.net/rugcutte_funambol?characterEncoding=UTF-8
jdbc.user=rugcutte_funambo
jdbc.password=funambol
THen I try to run the install, but get the following error:
/opt/Funambol/ds-server/install/install.xml:452: java.sql.SQLException: Access denied for user 'rugcutte_funambo'#'ec2-50-16-233-200.compute-1.amazonaws.com' (using password: YES)
It appears my AWS instance can connect successfully to my MySQL database however it is trying to login with a fully qualified user name that is incorrect: rugcutte_funambo'#'ec2-50-16-233-200.compute-1.amazonaws.com
I tried also to change the line to : jdbc.user=rugcutte_funambo#myserver.net . But I got a similar error with that as well.
I am relatively inexperienced to JDBC. What is the proper way to set up this section of the install.properties file?
Did you enable access to that database with that user from that server?
What happens if you try and just make the same mysql connection from the command line from your Funambol server?
Thanks Adam.
You led me to the correct answer. The remote host has an area in cPanel to configure Remote Database Access Hosts. So I did, need to add my source host that is running Funambol, to my list of access hosts.
After this I ran the install and it did, appear to create the tables properly in the database running on my remote host.