Solved

Perl MySQL connection problem

Posted on 2014-12-28
1
231 Views
Last Modified: 2014-12-29
I am trying to get a connection to mysql on localhost but having issues.
First, looks like the only DBD mysql package available for my win64 maching is DBD-mysqlPP (when searching with ppm).
I have installed the DBD-mysqlPP package successfully but when attempting a connection I get an error "#08S01Bad handshake". Any assistance would be much appreciated!  Perl newbie (duh).
Here is my perl page:

#!C:\wamp\bin\perl\bin\perl
use strict;
use warnings;
use CGI qw{ :standard };
use CGI::Carp qw{ fatalsToBrowser };
use DBI;
use DBD::mysqlPP;

# Connect to the database.
my $dbh = DBI->connect("DBI:mysqlPP:database=main_db;host=localhost","","",{'RaiseError' => 1});

# HTTP HEADER
print "Content-type: text/html; charset=iso-8859-1\n\n";

print "hello";
0
Comment
Question by:kevbob650
1 Comment
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40521392
Your code does not match the example on the man page: http://search.cpan.org/dist/DBD-mysqlPP/mysqlPP.pm  In addition, I have never seen any connection to MySQL that would work without a username.  Look in the config for phpMyAdmin to find out what it's using.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Creating and Managing Databases with phpMyAdmin in cPanel.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now