in reply to Re^2: connecting to Mysql from Win32
in thread connecting to Mysql from Win32

Your code works for me. I know this is the obvious but DBD::mysql is installed right? As well your password is empty, do you really have an empty password?

Update:
MySQL 4.1.1
Activestate Perl, v5.8.4
Win 2000
DBD-mysql 2.9003

Replies are listed 'Best First'.
Re^4: connecting to Mysql from Win32
by bfdi533 (Friar) on Oct 22, 2004 at 18:12 UTC
    Yes, DBD::mysql is installed as you can see:
    C:\Data\Scripts\Exchange>ppm query dbd::mysql DBD-mysql [2.9002] A MySQL driver for the Perl5 Database Interface (DB +I) C:\Data\Scripts\Exchange>ppm verify dbd::mysql Package 'dbd-mysql' is up to date.

    And, yes, I normally use a blank password when connecting to the database. But, normally, I only connect from localhost on the linux box. I did a grant just now to add the user with a password with host of the win32 boxes ip address.

    Still, the same problem. No connect and no errors. Just the exit with no explanation ..."

      Windows 2003 Server is super strict with any program run under it. If it detects a buffer overflow in the code it will kill the application immediately without a GPF, the process just disappears. Perhaps something in Perl or the MySQL driver is causing an issue.
      Have you tried on a Windows 2000 machine?
      Update:
      Here is an except from Changes to Functionality in Microsoft Windows XP Service Pack 2 which is basically what MS is doing in Windows 2003 Server.

      Memory protection. Some attacks by malicious software leverage software security vulnerabilities that allow too much data to be copied into areas of the computer’s memory. These vulnerabilities are typically referred to as buffer overruns. Although no single technique can completely eliminate this type of vulnerability, Microsoft is employing a number of security technologies to mitigate these attacks from different angles. First, core Windows components have been recompiled with the most recent version of our compiler technology, which provides added protection against buffer overruns. Additionally, Microsoft is working with microprocessor companies to help Windows support hardware-enforced data execution prevention (DEP) on microprocessors that contain the feature. Data execution prevention uses the CPU to mark all memory locations in an application as non-executable, unless the location explicitly contains executable code. This way, when an attacking worm or virus inserts program code into a portion of memory marked for data only, an application or Windows component will not run it.

        Seems like that is the item the more I look into this.

        I did run this just now from a Windows 2000 machine and it works just fine. I noticed that I have a very minor version difference on the DBD::mysql module so am going to try an upragade and see if that fixes it.

        Also, I have seen reference to an "all perl" dbd module for Mysql which I might check out as well.

        Thanks, btw, for your info; it was quite useful.

        Update: I have just tried switching to the DBD::mysqlPP driver and it does, indeed work. I can connect and retrieve data from the db.

        Ed