| | |
Warning message: 'old-style' syntax
Thread Solved |
I am trying to connect Mysql5.1 from Perl 5.8.8 on RHEL5 as follows:
When I try to run perl containing above connection, it gets connected to Mysql and fetches data but displays following warning.
What can be done to remove this warning?
Thanks and Regards
Perl Syntax (Toggle Plain Text)
$dsn="DBI:mysql:database=mysql"; $dbh=DBI->connect($dsn, 'root', 'root', 'mysql',{RaiseError => 1});
•
•
•
•
DBI->connect using 'old-style' syntax is deprecated and will be an error in future versions
Thanks and Regards
I don't know, you can try www.perlmonks.com or ask on the dbi modules mailing list (see the DBI module for details)
You need to remove the 'mysql' parameter from connect. Should look something like this:
perl Syntax (Toggle Plain Text)
use DBI; $dsn="DBI:mysql:database=mysql"; $dbh=DBI->connect($dsn, 'root', 'root', {RaiseError => 1});
•
•
•
•
You need to remove the 'mysql' parameter from connect. Should look something like this:
perl Syntax (Toggle Plain Text)
use DBI; $dsn="DBI:mysql:database=mysql"; $dbh=DBI->connect($dsn, 'root', 'root', {RaiseError => 1});
![]() |
Similar Threads
- Parse error: syntax error, unexpected T_STRING (PHP)
- How to configure GD (PHP)
- php.ini confusion (PHP)
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
- WHY IS THIS NOT WORKIGN!? INCLUDING HEADER FILES AND CPP FILES --hello everyone! (C++)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- Matrix Determinate Calculation (C++)
- How do I set multi level/rank access to a page? :>/ (PHP)
- OpenGL (Game Development)
- Warning: mysql_num_rows(): (PHP)
Other Threads in the Perl Forum
- Previous Thread: 500 Internal Error, But script runs on shell!
- Next Thread: Perl script
| Thread Tools | Search this Thread |






