Supply a hostname to the connect call (localhost if the database server is on the same machine), so that mysql connects through the network.
Also I think you have to write "dbi:mysql:database=$db".
See DBD::mysql for more information.
In reply to Re: Connect to MySQL database (on Ubuntu Server) using Perl
by moritz
in thread Connect to MySQL database (on Ubuntu Server) using Perl
by liverpaul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |