Jump to content
  • Join-Us

    https://metin2.dev is the 1st international community on Metin2 development. Join us to develop your skills and share your knowledge with the community, respectful and ethical forum.

  • 0

mysql problem after installing freebsd


Haar2

Question

Hi guys! Do anyone know why do i get this errors o=in db?

Real Server
Log Offmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsSuccess PLAYER
mysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 secondsmysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
   failed, retrying in 5 seconds

Link to comment
Share on other sites

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

4 answers to this question

Recommended Posts

  • 0
  • Premium

This path "/tmp/mysql.sock" is hardcoded in the source, but modern ports of MySQL and MariaDB use "/var/run/mysql/mysql.sock" instead.

You have 3 options:

1. Edit the MySQL config to match what db expects (easy)

First find your my.cnf file as the location may vary depending on which version and flavor of MySQL you have:

find / -type f -name 'my.cnf'

Edit the resulting file* and search for a line like similar to this one:

socket = "/var/run/mysql/mysql.sock"

Either add this line or change the existing one to read:

socket = "/tmp/mysql.sock"

then restart the MySQL server:

server mysql-server restart

2. Edit the source to match current standards (proper)

Search for the string "/tmp/mysql.sock" in the source and replace it with "/var/run/mysql/mysql.sock".

3. Not use sockets at all (desperate)

If you can't get any of this to work, search for SOCKET in your CONFIG files and replace every occurence with 127.0.0.1 to use less efficient TCP connections instead.

 

* If you find more than one my.cnf, you should probably edit /usr/local/etc/mysql/my.cnf as that is currently the standard location.

Previously it was /usr/local/etc/my.cnf, earlier /var/db/mysql/my.cnf and even earlier, /etc/my.cnf

Which one of these takes precedence may be hard to figure out but I had to mention this given the strange fascination Metin2 people have with using ancient versions of freely available software.

Edited by NOOP

Currently working on my FreeBSD blog:

FreeBSD is Fun, practical tutorials and articles

⚠️                Are you under attack?               ⚠️

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.