Solved

Perl MySQL connection problem

Posted on 2014-12-28
1
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mysql joining from the same table 6 53
Currency in SQL? 2 45
MySqli Real Escape String and SQL Injection 1 49
restriction of entering a a page 5 34
Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

733 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