From: Daniel Berger Date: 2006-03-25T01:40:45+09:00 Subject: Re: DBI connection problem Reis wrote: > I'm trying to use dbi to connect to MySQL 4.0.18 on windows XP > professional. > > I have used a test with this code > > ------------------------------------------------ > # simple.rb - simple MySQL script using Ruby DBI module > require "dbi" > > begin > # connect to the MySQL server > dbh = DBI.connect("dbi:Mysql:test:localhost", "testuser", "testpass") > # get server version string and display it > row = dbh.select_one("SELECT VERSION()") > puts "Server version: " + row[0] > rescue DBI::DatabaseError => e > puts "An error occurred" > puts "Error code: #{e.err}" > puts "Error message: #{e.errstr}" > ensure > # disconnect from server > dbh.disconnect if dbh > end > ------------------------------------------------ > > But i have this error. It looks like you have the DBD but don't have the underlying MySQL driver. Remember, the DBD is just the frontend to the driver, not the driver itself. Regards, Dan