Unhandled exception: Wrong number or type of arguments for overloaded function 'TextBox_append_text_with_encoding'.
Possible C/C++ prototypes are:
mforms::TextBox::append_text_with_encoding(std::string const &,std::string const &,bool)
mforms::TextBox::append_text_with_encoding(std::string const &,std::string const &)
本地 MySQL服务器不能打开了。通过 phpMyAdmin登录后台却提示我「#2002 无法登录 MySQL服务器」。
尝试通过终端启动 mysql服务也失败了,各种命令都敲遍了,提示我「The server quit without updating PID file(…)」还有「The /usr/local/mysql/data directory is not owned by the ‘mysql’ or ‘_mysql’ user」之类等等。
最后,终于,找到了原因…
Mac OS X的升级或者其他原因可能会导致 MySQL启动或者开机自动运行,在 MySQL的操作面板上会提示「Warning:The /usr/local/mysql/data directory is not owned by the ‘mysql’ or ‘_mysql’」,或者在命令行下提示「Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’」
这应该是某种情况下导致 /usr/local/mysql/data 的宿主发生了改变,只需要运行「sudo chown -R mysql /usr/local/mysql/data」,然后终端重启 Apache,再运行「sudo /usr/local/mysql/supportfiles/mysql.server start」即可重新开启 MySQL服务器。
另外,虽然下面这个问题我还没遇到,不过貌似也是 Mac OS X下会出现的情况,留着以后说不定用得上:
使用 PHP连接 MySQL可能会报错「Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’」,或者使用localhost无法连接MySQL而需要127.0.0.1,原因是连接时候php默认去找 /var/mysql/mysql.sock 了,但是MAC版本的MYSQL改动了文件的位置,放在/tmp下了。处理办法是按如下修改php.ini:
mysql.default_socket = /tmp/mysql.sock