如何配置 PHP 以使用 mysql 而不是 sqlite

How do you configure PHP to use mysql instead of sqlite

我在 centos 上安装了 PHP 5.3 和 MYSQL 5.1。

PHP 默认使用 SQLite,如何配置 PHP 以使用 MYSQL?

如果 drupal 无法将 mysql 识别为有效的数据库后端,那么您的 mysql 似乎没有正确安装。尝试

yum install mysql mysql-server php-mysql
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
mysql_secure_installation

并用

重启apache
/etc/init.d/httpd restart

然后再次尝试配置 drupal。