xref: /php-src/ext/pdo_mysql/tests/README.md (revision 50752401)
1# The pdo_mysql extension tests
2
3You must set the following environment variables to run the tests:
4
5```bash
6# DSN; For example: mysql:dbname=test;host=localhost;port=3306
7PDO_MYSQL_TEST_DSN
8
9# Database host
10PDO_MYSQL_TEST_HOST
11
12# Database (schema) name
13PDO_MYSQL_TEST_DB
14
15# Database server socket
16PDO_MYSQL_TEST_SOCKET
17
18# Storage engine to use
19PDO_MYSQL_TEST_ENGINE
20
21# Database user
22PDO_MYSQL_TEST_USER
23
24# Database user password
25PDO_MYSQL_TEST_PASS
26
27# Database charset
28PDO_MYSQL_TEST_CHARSET
29```
30
31NOTE: if any of `PDO_MYSQL_TEST_[HOST|DB|SOCKET|ENGINE|CHARSET]` is part of
32`PDO_MYSQL_TEST_DSN`, the values must match. That is, for example, for
33`PDO_MYSQL_TEST_DSN = mysql:dbname=test` you MUST set `PDO_MYSQL_TEST_DB=test`.
34
35## MySQL User Permissions
36
37The MySQL user used to run the tests must have full permissions on the test
38database, plus the following additional permissions:
39
40* SUPER: Required to [create functions if binary logging is enabled](https://dev.mysql.com/doc/refman/8.0/en/stored-programs-logging.html#sa38412929)
41* SELECT permissions on performance_schema.session_connect_attrs
42