帮忙看看

帮忙看看

帮忙看看
大家好,现在碰到一个问题,我的一个程序运行不起来,下面把程序列出来:
#!/usr/bin/perl
#Fig.15.24:fig15_24.pl
#Creating a table.

use warnings;
use strict;
use DBI;
use DBD::mysql;

my $dbh=DBI->connect("DBI:mysql:db","root","123456",
{RaiseError=>1});

my $string="CREATE TABLE Users(
FirstName VARCHAR(30),
LastName VARCHAR(30),
Email VARCHAR(30),
Phone VARCHAR(30),
Continent ENUM('North America',
'South America',
'Europe',
'Asia',
'Africa',
'Australia',
'Antarctica'),
OpSys ENUM('Windows NT',
'Windows 98',
'Macintosh',
'Linux',
'Other'),
Hours INT,
Rating INT)";

$dbh->do($string);

$dbh->do("INSERT INTO Users(
FirstName.LastName,Email,Phone,
Continent,OpSys,Hours,Rating)
VALUES('John','Doe','john\@doe.net',
'(555)555-5555','North America',
'Windows98',3,4)");

my $sth=$dbh->prepare("SELECT*FORM Users");
$sth->execute();

while(my @row=$sth->fetchrow_array()){
print("@row\n");
}

warn($DBI::errstr) if($DBI::err);
$dbh->disconnect();
$sth->finish();
我用PERL运行后,出现问题,提示如下:
DBI connect('db','root',...) failed: Client does not support authentication protocol requested by server; consider upgrading MySQL client at fig15-24.pl line 10
请大家帮我看看什么问题,多谢了!
升级 mysql 或者升级 DBD:.
升级 mysql 或者升级 DBD::mysql 试试
谢谢了 !