last time, our developers have given me following error, while trying to use mysql database connection from php :
File 'NONEXISTENT/charsets/?.conf' not found (Errcode: 2)
Character set '#51' is not a compiled character set and is not specified in the 'NONEXISTENT/charsets/Index' file
i spend 3 working hours to detect what was the reason of this, and the problem was inside php which was compiled with it's internal mysql support. once i recompiled php (--with-mysql=/path/to/mysql) with system installed mysql version, the problem is gone!
PS: you can also check this mysql charset problems page, if you having troubles like this.