这是一个DNS问题,因为我在没有配置我们内部DNS服务器的对接机中运行本地DB。ERROR: could not connect to server "pgs3"
DETAIL: could not translate host,我可以使用psql -U myuser -W -h db7.ap.int.unavco.org -d pgs3连接到
我使用PHP和一个PDO对象连接到mysql。我有3个数据库服务器,我的php代码可以连接到。如果我尝试连接到数据库服务器#1,但连接失败,我想立即尝试连接到数据库服务器#2。我可以用下面的代码将连接超时时间设置为1秒。$DBH = new PDO("mysql:host=$host;dbname=$dbname&qu