MyBB Community Forums

Full Version: Enable MYSQL Network Compression
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I am trying to enable MYSQL network traffic compression because my mysql server is hosted on a VPS separate from my webserver in a metered bandwidth solution. Here is what I am trying to implement, but am not sure where to put it in the db_mysqli.php (still trying to find the right spot though). Any ideas?

MYSQLI_CLIENT_COMPRESS
http://php.net/manual/en/mysqli.real-connect.php

Thank you,
Chris

Solved: The solution is to re-define the link protocol in line 207 of the db_mysqli.php with:

$this->$link = mysqli_init();

mysqli_real_connect($this->$link, 'hostname', 'username', 'password', 'dbname', port, '/var/lib/mysql/mysql.sock', MYSQLI_CLIENT_COMPRESS);