简体   繁体   中英

Error: Can't connect to local MySQL server through socket

I am using vBulletin in my site. And, althought connection and everything is right in the config files, I get this error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

Don't know what is the issue... any help would be appreciated

Also, if I should submit a ticket to the administration, what should I ask about? MySQL port used?

MySQL used to default to connecting through that socket (and to disable networked access through port 3306) but a few years ago they changed to default to networked on 3306 but locked down for security. Seems like vBulletin is looking for MySQL through that socket but you need to give it a host name.

If the db is on the same machine as the web server, try passing a host -- localhost, 127.0.0.1 are the typical -- and it should work. You might get a different error (regarding user/pass) but at least then you are on to a user/pass issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM