装的是单机多实例 #[client] #这里不知道这么配置 #socket = /usr/local/greatsql/data/3306/mysql.sock [mysql] loose-skip-binary-as-hex #prompt = "(\\D)[\\u@GreatSQL][\\d]>" no-auto-rehash [mysqld@mgr01] datadir = /usr/local/greatsql/data/3306 socket = /usr/local/greatsql/data/3306/mysql.sock port = 3306 server_id=103306 [mysqld@mgr02] datadir = /usr/local/greatsql/data/3307 socket = /usr/local/greatsql/data/3307/mysql.sock port = 3307 server_id=103307 通过不同端口连接到数据库,mysql_real_connect 1 老是报 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ,当然 因为我不是安装在这里,网上说做软连接,但我现在是两个实例 这个这么配置 2 如果是单个实例的话 #[client] socket = /usr/local/greatsql/data/3306/mysql.sock 上面这么配置 也还是报 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ,即上面的配置没有生效,这个其实我也不太想做软连接,总感觉不是正常途径。 |
合作电话:010-64087828
社区邮箱:greatsql@greatdb.com