Fix PHP mysql_connect() Headers and client library minor version mismatch

user-pic
Vote 0 Votes

出現此訊息 Warning: mysql_connect() [function.mysql-connect]: Headers and client library minor version mismatch.
是因為 PHP 在編譯時, MySQL 的 header 跟 library 不一致所造成,
有可能系統中曾經裝了兩個版本以上的 MySQL, 可能是套件或 tarball 安裝

解決方式: 把所有 MySQL 套件移除及 /usr 其下所有 MySQL 相關 header 及 library 刪除, 再重裝 MySQL (用套件或 tarball 均可)
rpm -qa | grep -i mysql | xargs rpm -e --nodeps # 僅適用 RPM 系 Linux
find /usr -name "mysql" -exec rm -rf {} \;
find /usr -name "my*" -exec rm {} \;

Leave a comment

About this Entry

This page contains a single entry by Pank published on February 28, 2012 8:14 AM.

Show QR Codes in Web Pages was the previous entry in this blog.

Windows Live Messenger 8.5 RIP is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives