Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keden92/php_galera_mysqli
mysqli class for usage with galera cluster - includes loadbalancing
https://github.com/keden92/php_galera_mysqli
class galera galera-cluster mariadb mariadb-client mariadb-connector mariadb-database mariadb-galera-cluster mariadb-mysql php php-framework php-library php7
Last synced: about 1 month ago
JSON representation
mysqli class for usage with galera cluster - includes loadbalancing
- Host: GitHub
- URL: https://github.com/keden92/php_galera_mysqli
- Owner: Keden92
- License: mit
- Created: 2021-07-31T13:34:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-31T15:46:29.000Z (over 3 years ago)
- Last Synced: 2024-07-21T17:25:27.475Z (5 months ago)
- Topics: class, galera, galera-cluster, mariadb, mariadb-client, mariadb-connector, mariadb-database, mariadb-galera-cluster, mariadb-mysql, php, php-framework, php-library, php7
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# galera_mysqli
- mysqli class for usage with galera cluster
- includes loadbalancing|[!!! for ONLY 2 Node Cluster comment in Line 126 !!!](https://github.com/Keden92/php_galera_mysqli/blob/adf01a7f3c2d41045b5f68b7ee807d6a46ce9a87/galera_mysqli.class.php#L126)|
| :---: |## MAIN
- mysqli class for use with galera cluster Database
- also works with Standalone Database Server
- uses "random" for Load-Balancing if no host specified## USAGE
- simply pass for $host an array of servers
```
$hosts = array("10.0.0.1", "10.0.0.2", "10.0.0.3");
$mysqli = new galera_mysqli($hosts, $user, $pass,...);
```
- for use of en explizit host pass the array_id to $hostindex
```
$hosts = array("10.0.0.1", "10.0.0.2", "10.0.0.3");
$mysqli = new galera_mysqli($hosts, $user, $pass,..., 2);
```## ADDITIONAL
- addet magic __sleep & __wakeup methods for serialization
- addet method get_selected_db()