Connect via perl:DBI to MariaDB takes more than 9 minutes

huangapple go评论48阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年5月10日 23:23:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76220186.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定