MySQL JDBC Driver for Coldfusion (2021 Release)
Copy link to clipboard
Copied
Moved from an old laptop to a new Surface computer. Trying to connect my Localhost (127.0.0.1) installation on Windows 10 on the IIs server to my existing MySQL database. CF Administrator works fine, as do my CF templates (except for queries, of course). Got this message:
"The standalone MySQL JDBC driver is no longer shipped with ColdFusion.
Please download it, put it in cf_root/lib folder and restart ColdFusion."
1. Where to I get the correct MySQL JDBC driver?
2. Does is go under C:\ColdFusion2021\cfusion\lib ?
Thanks in advance.
Copy link to clipboard
Copied
Steps to download and install:
1) Go to
https://dev.mysql.com/downloads/connector/j/
Select Operating System: Platform Independent,
then click on "Download" button for "Platform Independent (Architecture Independent), ZIP Archive".
2) To download directly, click on "No thanks, just start my download". This will trigger the download of the file mysql-connector-java-8.0.22.zip.
3) Unzip the downloaded file. Copy mysql-connector-java-8.0.22.jar to C:\ColdFusion2021\cfusion\lib
4) Restart ColdFusion 2021
Copy link to clipboard
Copied
Did you try the suggestion, @jimm710400 . If so, any joy?
Copy link to clipboard
Copied
Thanks for the help. Definitely closer. I now know its just getting the other settings right for MySQL setup. I've done this a few times in the past, as I started with Allaire Coldfusion 4.0, but the settings are different from my existing Coldfusion 10 version on my old laptop. So do you know what the setup settings are supposed to be? What I've tried:
Datasource Name: family
Driver: MySQL [the other option was MySQL (DataDirect)]
Clicked the Add button, then on the next screen:
CF Datasource Name: family
Server: 127.0.0.1
Database: familyUS (this is the db name in MySQL Administrator, which works fine)
Port: 3306
Username: admin (the default) (my laptop CFADMIN that works uses ROOT)
Password: the password used to get into CFADMIN
Copy link to clipboard
Copied
The settings look OK. I am assuming that the MySQL server is localhost. The Username/Password combination should be the one you use for the MySQL database.
Copy link to clipboard
Copied
Jmm, you say that the username you're using is "admin", while the old laptop uses Root. Why the difference?
Then you say that the password is the one "used to get into CF Admin". Why?
Or am I misunderstanding what you wrote?
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
On my laptop with CF 10, I have several MySQL databases. LocalHost databases do not have individual passwords (unlike the corresponding DBs live online where passwords are unique). I use admin/password to get into CF Admin on LocalHost Windows IIs on my old laptop. The individual databases created a datasource fine with root/password (where password is the same for geting into CF Admin and for ALL databases). At least this works on CF Admin in CF 10 on Windows with IIs. No problem. As for getting this to work on the Surface with CF 2021, I've tried admin/password and root/password, where password in the same as that used to get into CF Admin on CF 2021 on my Surface IIs. Neither username works.
Copy link to clipboard
Copied
I'm not aware of any way that you could use root and the cf admin password as the password for a mysql db, unless you defined that as the root pw in mysql itself.
And you may have done that on the mysql on your old machine. But you now shown here using 127. 0.0.1 in your cf dsn, so it's a local mysql install. Try changing its root pw to what your using for that previous one.
Make sense?
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
@jimm710400 you can verify what your password is as follows:
- Click on Windows Start and type cmd;
- Right-click on Command Prompt and choose to open as Administrator, which should open the Command Prompt;
- Use the CD command to navigate to the /bin directory of your MySQL installation. For example, on my machine, the command is: cd C:\Program Files\MySQL\MySQL Server 8.0\bin
- Run the DOS command, mysql -u root - yourPasswordHere
With which password is it possible to log in? (Remember you may, as one test, leave the password field blank)
Copy link to clipboard
Copied
Then again, you might have forgotten the password. No worries. There is an easy way to manage MySQL passwords:
- Download and install the MySQL Workbench (on the machine where MySQL is installed).
- Launch MySQL Workbench
- Open a connection to the local MySQL instance.
- Click on 'Users and Privileges'. This enables you to reset MySQL passwords.
Copy link to clipboard
Copied
@jimm710400 , are you up and running?

