MySQL Forums
Forum List  »  Connector/ODBC

Data Source Name Not Found and No Driver Specified
Posted by: Phillip Powell
Date: February 16, 2025 12:42PM

I installed MySQL 8.0 successfully on my brand new laptop (Win 11 64GB RAM if that's relevant)

I updated my MDAC and installed Visual Studio C++ x86 Redistributable

Then I downloaded and installed the MySQL 8.0 Drivers, and I was able to find them via C:\Windows\SysWOW64\odbcad32.exe

I created a User DSN and restarted my laptop

However, my development website continues to not find the drivers nor data source name

"Data Source Name Not Found and No Driver Specified"

This is a showstopper inasmuch as my development website fails to run, thus, no changes can be made to the Production version if I can't get the new development website to configure correctly.

Anyone help? Thanks

This is the connection string I created that worked fine before:

var VALS = {};

function populateVals() {
var key = "";
var line = "";
var keyVal = [];
var fso = Server.CreateObject("Scripting.FileSystemObject");
var file = fso.openTextFile(Server.MapPath("/.user.ini"), 1);
do {
line = file.readLine();
if (!String.isNullOrEmpty(line) && line.trim().indexOf(";") != 0 &&
line.trim().indexOf("[") != 0 && line.trim().indexOf("=") > 0
) {
keyVal = line.split("=");
if (typeof keyVal !== 'undefined' && keyVal != null && keyVal.length == 2 && !String.isNullOrEmpty(keyVal[0])) {
key = keyVal[0].trim();
if (!String.isNullOrEmpty(keyVal[1]) && keyVal[1].trim().startsWith("\"") && keyVal[1].trim().endsWith("\"")) {
VALS[key] = keyVal[1].trim().substring(1, keyVal[1].trim().length - 1);
} else if (!String.isNullOrEmpty(keyVal[1])) {
VALS[key] = keyVal[1].trim();
}
}
}
} while (!file.atEndOfStream);

file.close();
file = null;
fso = null;
}

populateVals();

var DB_CONNECTION_STR =
"Provider=MSDASQL; DRIVER={MySQL ODBC 8.0 Unicode Driver}; SERVER=" + VALS["mysql_db_host"] + "; PORT=" +
VALS["mysql_db_port"] + "; DATABASE=" + VALS["mysql_db_name"] + "; UID=" + VALS["mysql_db_user"] +
"; PWD=" + VALS["mysql_db_password"] + "; OPTION=3;";

Options: ReplyQuote


Subject
Written By
Posted
Data Source Name Not Found and No Driver Specified
February 16, 2025 12:42PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.