xref: /PHP-8.4/ext/mysqli/tests/README.md (revision c44834d8)
1# The mysqli extension tests
2
3To run the tests, a test database must be created in the MySQL command-line:
4```sql
5CREATE DATABASE test;
6```
7
8The test suite will create the necessary tables for testing, and then delete them when testing is complete. Creating a dedicated table prior to running the tests is unnecessary. There are default values for `MYSQL_TEST_HOST`, `MYSQL_TEST_USER`, `MYSQL_TEST_DB` and `MYSQL_TEST_PASSWD`. If your values differ from the defaults, then environment variables must be set.
9
10```bash
11# Database host
12# Default: localhost
13MYSQL_TEST_HOST
14
15# Database port
16MYSQL_TEST_PORT
17
18# Database user
19# Default: root
20MYSQL_TEST_USER
21
22# Database user password
23# The default password is empty (no password).
24MYSQL_TEST_PASSWD
25
26# Database name
27# Default: test
28MYSQL_TEST_DB
29
30# Storage engine to use
31MYSQL_TEST_ENGINE
32
33# Database server socket
34MYSQL_TEST_SOCKET
35```
36
37## MySQL User Permissions
38
39The MySQL user used to run the tests must have full permissions on the test database.
40