我的调用代码如下
bool suc = conn.connect("mydb", "localhost", "root", "");
if (suc)
{
cout << "success" << endl;
}
else
{
cout << "fail " << conn.error() << endl;
}
并且 mysql 服务器正在运行,但程序失败说 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
有没有人遇到过这样的问题?