I am having trouble connecting to a database. Below is the Perl script that doesn't work:
use DBI;
my $dbh = DBI->connect(
'dbi:mysql:orders;mysql_socket:/opt/lampp/var/mysql/mysql.sock',
$username,
$password,
{ RaiseError => 0, AutoCommit => 0 },
)
or die $DBI::errstr;
Normally when I try to open the mysql.sock
file using open function there is a error but I can't open it.