英文:
Connect via perl:DBI to MariaDB takes more than 9 minutes
问题
I am running a perl script to update a table in a MariaDB. For a long time, this worked without any problems. But since some system upgrade, the connect to the MariaDB in the same computer takes more than 9 minutes.
- Connect to a mySql database on a remote computer via perl: no problem.
- Connect to MariaDB on local computer via MySqlWorkbench: takes too long to connect
- Connect to MariaDB on local computer via mysql-connector-java: no problem
Connect call is
perl:DBI should connect to MariaDB within seconds.
my $dbh = DBI->connect("DBI:mysql:$schema;host=$host", $user, $passwd,
{RaiseError => 0 }
) || die "ERROR: Could not connect to database: $DBI::errstr";
英文:
I am running a perl script to update a table in a MariaDB. For a long time, this worked without any problems. But since some system upgrade, the connect to the MariaDB in the same computer takes more than 9 minutes.
- Connect to a mySql database on a remote computer via perl: no problem.
- Connect to MariaDB on local computer via MySqlWorkbench: takes too long to connect
- Connect to MariaDB on local computer via mysql-connector-java: no problem
Connect call is
perl:DBI should connect to MariaDB within seconds.
my $dbh = DBI->connect("DBI:mysql:$schema;host=$host", $user, $passwd,
{RaiseError => 0 }
) || die "ERROR: Could not connect to database: $DBI::errstr";
答案1
得分: 0
问题似乎不是出在MariaDB,而是出在Leap网络配置上。服务器上的ping显示使用了IPv6地址,但系统没有响应。禁用IPv6后,ping显示IPv4地址,而MariaDB的问题得到解决。仍然存在一个问题,为什么在启用IPv6的情况下ping不起作用,但那是另一个问题。
英文:
The problem seems not to be with MariaDB but rather with leap network configuration. ping on the server shows that an ipv6 address is used, but the system does not respond. Disabling ipv6 shows an ipv4 address for ping, and the problem with MariaDB is resolved. There remains the question why ping does not work with an active ipv6, but that is an other problem.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论