ASSS Questions - Connecting to mysql Animate Dreams - Sun Jun 11, 2006 6:28 pm Post subject: Connecting to mysql
Well, I got mysql running on my (Fedora 5)computer. Figured out how to add users and added a user asss with a password, and a database asss. The asss server and mysql server are running on the same computer. Specifically, I used the command "grant all privileges on *.* to asss@localhost
identified by 'a password' with grant option;"
Anyway, I set up my global.conf to match that, everything should be working fine. But when I start up asss with the two mysql modules loaded, I get this error: "W <mysql> connect failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
I already read through the userguide, devguide, and the asss wiki on this, so I decided I'd check here to get some help. >_>
Thanks in advance.
BDwinsAlt - Sun Jun 11, 2006 9:05 pm Post subject:
What did you use for the ip on asss? Make sure it's localhost. Check the ports. Have you set up a db before? Besure you know your doing everything exactly right. Sometimes you have to do more than just adding a user. Make sure the database name is correct. I don't have much experiance with ASSS. I did run a test zone but I never used mysql. Good luck.
Dr Brain - Sun Jun 11, 2006 10:14 pm Post subject:
Do a
and tell us where the UNIX socket is located. You may need to run the command without a -p if you have no root mysql pass.
Grelminar - Tue Jun 13, 2006 3:36 am Post subject:
It's probably because the pre-compiled version is using an older version of the client library that looks in /tmp/mysql.sock, and newer servers use /var/run/mysql/sock or something like that. Compile database.so yourself, against the version of the client library on your system. Or force it to use tcp instead of unix sockets (I think setting host to "127.0.0.1" instead of "localhost" will work, but be sure mysqld is listening on the tcp port).
[update] You might also be able to fix this by editing /etc/my.conf. I don't know enough about mysql to say for sure.
Dr Brain - Tue Jun 13, 2006 8:54 am Post subject:
I was able to help him in game by changing run-asss to export the correct value of $MYSQL_UNIX_SOCK. For some reason, the my.cnf fix didn't work.
Animate Dreams - Tue Jun 13, 2006 10:14 pm Post subject:
Yeah, Brain helped me out and got it working for me. I'm proud I got as far as I did without any help, but... where is it you looked to find out the $MYSQL_UNIX_SOCK thing? See, I had no clue where to look... hopefully I can figure it out on my own next time.
Dr Brain - Wed Jun 14, 2006 12:03 am Post subject:
I googled your error, and found a page in the mysql online documentation explaining how to use that enviroment variable.
Animate Dreams - Thu Jun 15, 2006 11:27 pm Post subject:
=o