MySQL Connection Windows 2008 Server R2

Hi there

I host a website for a customer who wants to add a MySQL database to the site. We've created the database and populated it with the SQL but he cannot connect to the database. This is the sort of error he gets:

Try: server=127.0.0.1; database=webdb; uid=application; pwd=<pwd>;
Error # 0x80004005 (-2147467259) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Seems as though I need to add a DSN for him but at this point have no idea how to tell the server it's a MySQL and not an SQL DSN I need. Can someone point me in the right direction?

Many thanks
Chris
LVL 1
Chris KenwardDirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wayne88Commented:
"Data source name not found and no default driver specified"

Do you also have MSSQL running on the same server?  If so, have you differentiate the port for MySQL?

I think you still need to create the DSN then refer to the DSN name to connect. Try creating the DSN first in 32-bit as well as 64-bit to be sure.

add the port number to the ip address.  for port 5000 example,

server=127.0.0.1:5000
0
Dave BaldwinFixer of ProblemsCommented:
You need one of the MySQL connectors, .NET, ODBC, or if you are running PHP, the MySQLi functions in PHP.  Here is a list of the connectors that are available:  https://www.mysql.com/products/connector/   You also need to create a user, password, and connection that he can use.  You need all three items.  http://dev.mysql.com/doc/refman/5.6/en/user-account-management.html
0
Ryan ChongCommented:
>>Seems as though I need to add a DSN for him but at this point have no idea how to tell the server it's a MySQL and not an SQL DSN I need. Can someone point me in the right direction?

since you're trying to connect to MySQL via DSN, you need to ensure the ODBC Driver for MySQL (Connector/ODBC) as mentioned in the first link provided by Dave was installed in the machine.

Once the driver is installed, you should be able to see "MySQL" in the new Create DSN wizard.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Chris KenwardDirectorAuthor Commented:
Hi there Folks

Dave - I have installed the ODBC driver and set up the DSN for him. Could you tell me what the connection string should look like because what he's using isn't working.

Many thanks to all
Chris
0
Dave BaldwinFixer of ProblemsCommented:
You have to have a valid login (username, password, and source host or IP) and you can test it in the ODBC manager.
0
Chris KenwardDirectorAuthor Commented:
Dave when I test it in the DNS manager, it says "Test successfull" but when I try to connect to the database I get this:

Try: driver={MySQL ODBC 5.3 UNICODE Driver}; server=127.0.0.1; port=3306; database=webdb; uid=username; pwd=<pwd>; option=3;
Error # 0x80004005 (-2147467259) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Here's the string in use by our customer:
"driver={MySQL ODBC 5.3 UNICODE Driver}; server=127.0.0.1; port=3306; database=webdb; uid=<username>; pwd=<password>; option=3;" )

The ODBC driver I installed was the 64-bit version and I'm using Unicode Version of the driver

Regards
Chris
0
Dave BaldwinFixer of ProblemsCommented:
What programming language is your customer using?
0
Chris KenwardDirectorAuthor Commented:
Oh! He has a list of different strings and is trying them in the form of an array he's set up for the purpose.

If you look at clubweb.org.uk you'll see the errors....

Cheers
Chris
0
Chris KenwardDirectorAuthor Commented:
He's using ASP pages...

Cheers
Chris
0
Dave BaldwinFixer of ProblemsCommented:
Two things.  I believe Classic ASP is a 32-bit application so you may need the 32-bit ODBC driver.  Second, you may have to make it a System DSN for the ASP code to find it.  And third, the driver name must be an exact match to the name in the ODBC manager.

There may be another way to use the DSN but I don't have time to find it right now.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Chris KenwardDirectorAuthor Commented:
Thanks so much Dave. Thanks also to  Ryan Chong and Wayne88 for the input, although I think Dave had it nailed and was easier to follow. Really appreciate the help, folks.

Try: driver={MySQL ODBC 5.3 UNICODE Driver}; server=127.0.0.1; port=3306; database=webdb; uid=application; pwd=<pwd>; option=3;
SUCCESS!!!!

Cheers
Chris
0
Dave BaldwinFixer of ProblemsCommented:
Glad to help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.