Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/56.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 我可以使用相同的PDO dsn连接到mariadb吗?_Php_Mysql_Mariadb - Fatal编程技术网

Php 我可以使用相同的PDO dsn连接到mariadb吗?

Php 我可以使用相同的PDO dsn连接到mariadb吗?,php,mysql,mariadb,Php,Mysql,Mariadb,我希望使用mariadb,并想知道我是否可以使用与mysql相同的was DSN: mysql:host=localhost;dbname=wp;port=8889 是的,因为MariaDB本质上是MySQL的一个应用程序。因此,任何与MySQL一起工作的东西,包括DSN,都应该在MariaDB中工作。可能的重复存在一些例外情况,MariaDB可能需要一段时间来合并MySQL中的新功能,但对于99%的功能来说,没有区别。

我希望使用mariadb,并想知道我是否可以使用与mysql相同的was DSN:

mysql:host=localhost;dbname=wp;port=8889

是的,因为MariaDB本质上是MySQL的一个应用程序。因此,任何与MySQL一起工作的东西,包括DSN,都应该在MariaDB中工作。

可能的重复存在一些例外情况,MariaDB可能需要一段时间来合并MySQL中的新功能,但对于99%的功能来说,没有区别。