2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Debian/UbuntuにMariaDB入れた時のphp5-mysqlについて

Posted at

背景

Debian/Ubuntuの場合、標準パッケージのphp5-mysqlではライブラリとヘッダに差異がある為に、mysql_connect()などでエラー表示されてしまいます。

バージョンの確認方法

$ php -i | grep Client
Client API version => 10.0.14-MariaDB
Client API library version => 10.0.14-MariaDB
Client API header version => 5.5.38
Client API version => 10.0.14-MariaDB

Client API headerがMySQLの5.5.38のままで残る。

回避方法

こちらのページを参考に、とりあえず回避できました。
http://www.pontikis.net/blog/is-it-time-to-remove-mysql-in-favor-of-mariadb-in-production-servers

error_reporting(0);
$conn = mysql_connect('params');
error_reporting('YOUR SETTINGS');
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?