Repository navigation
mysql_connect_file
imshooter edited this page Nov 29, 2026
·
1 revision
Connect to a database with the settings of a file.
The file has a key = value setting on each line: hostname, username, password, database, server_port, auto_reconnect, multi_statements, pool_size, ssl_enable, ssl_key_file, ssl_cert_file, ssl_ca_file, ssl_ca_path and ssl_cipher, and the lower case names of the other E_MYSQL_OPTION values. A value takes ${NAME} from the environment of the server, as password = ${MYSQL_PASSWORD}.
native MySQL:mysql_connect_file(const file_name[] = "mysql.ini");With open.mp names, from the same include:
native MySQL:MySQL_ConnectFile(const file_name[] = "mysql.ini");| Parameter | Description |
|---|---|
const file_name[] = "mysql.ini" |
Path of the file. A relative path is looked for in scriptfiles first, then from the folder of the server. |
- The handle.
-
MYSQL_INVALID_HANDLEwhen the file cannot be read or has a setting that is not valid.
mysql 0.6.0 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Queries
- The cache
- JSON cells
- Prepared statements
- Transactions
- The ORM
- Passwords
- Errors
- TLS
- Coming from another plugin
- Performance
Reference
Functions
Connections
Queries
Cache
- cache_get_row_count
- cache_get_field_count
- cache_get_result_count
- cache_get_field_name
- cache_get_field_type
- cache_get_field_index
- cache_set_result
- cache_get_value_index
- cache_get_value_index_int
- cache_get_value_index_float
- cache_get_value_index_bool
- cache_is_value_index_null
- cache_get_value_name
- cache_get_value_name_int
- cache_get_value_name_float
- cache_get_value_name_bool
- cache_is_value_name_null
- cache_get_row
- cache_save
- cache_delete
- cache_set_active
- cache_unset_active
- cache_is_any_active
- cache_is_valid
- cache_affected_rows
- cache_insert_id
- cache_warning_count
- cache_get_query_exec_time
- cache_get_query_string
- cache_get_errno