Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning
Setup May Throw Errors If PDO Libraries Can't Be Found
Setup May Throw Errors If PDO Libraries Can't Be Found

The database setup step may throw errors like Error: Database connection "Mysql" is missing, or could not be created. if the command line php client can't find the PDO libraries. One way to ensure their availability is to build PHP --with-pdo-mysql (or with the appropriate flag for the database you are using).

You can test for this with php -r 'phpinfo();' | grep pdo:

No Format
$ php -r 'phpinfo();' | grep pdo
pdo_mysql
pdo_mysql.default_socket => /var/lib/mysql/mysql.sock => /var/lib/mysql/mysql.sock
pdo_sqlite

If the PDO libraries show correctly but you are still getting this error, you may be trying to connect via the default socket (ie: "localhost") instead of TCP (ie: "127.0.0.1"), and the PDO libraries may not be able to find the default socket.

Testing PHP Database Connectivity

...