in reply to
how perl can connect with mysql
You need at least two things:
- a colon (:) between "mysql" and "test1". It seems there is
a strange character instead (that was before you updated your code).
- An appropriate driver (DBD::mysql), without
which the DBI can't know which DBMS it should talk to.
If you want to know if the driver is already installed, use this
If no error is returned, then you have the right module installed. If you get
an error message, you should install it.
$ perl -MDBD::mysql -e 1