linux下qt designer(3.1) 连接 mysql数据库!
qt designer 3.1 版本
我选择了project 下的 database connecitons...下, 点击了new connection .
Name:是默认的
driver:选择了QMYSQL3
hostname:localhost(本机)
port:defalut
点connect 出来提示框:
could not connect to the database.
please ensure that the database server is runing and that all the connection information is correct.
{mysql3:unable to connect
can't connext to local mysql server through socker '/var/lib/mysql/mysql.sock'(2)]
我找到原因了.由于我的mysql.sock不在/var/lib/mysql/目录下,而是在 /opt/lampp/var/mysql/目录下.所以 can't connext to local mysql server through socker '/var/lib/mysql/mysql.sock'(2)
请问我怎么修改这个目录啊.谢谢!
我用的mysql是lampp 集成的一个,所以路径不是默认的/var/lib/mysql/mysql.sock'(2). 如果我把mysql.sock拷到这个目录,则出现错误如下:
Failed to open LHCDRecord database: QMYSQL3: Unable to connect
Client does not support authentication protocol requested by server; consider upgrading MySQL client
现在关键还是修改mysql.sock所在的路径. 谁会啊,帮了忙啊.谢了!呵呵
[ 此贴被XChinux在2005-11-10 22:44重新编辑 ]