Temporary In-Memory MySQL Server

Temporary In-Memory MySQL Server

Second instance of MySQL server in memory:

Implementation

One time only

Our in-memory server should not expose to network. The only communication should be socket. Therefore skip-networking.

Prepare mysqld_multi for work, but mysqld_multi was not polished enough, so I went for solution to write my init script.

Preparation:

To trick unit-tests into using my new MySQL server:

echo "pdo_mysql.default_socket=/tmp/mysql_temp.sock" >/etc/php5/fpm/conf.d/99-mysql_unittest_temp.ini

Setup

Cleanup:

rm -f /etc/php5/fpm/conf.d/99-mysql_unittest_temp.ini
date 16. Mar 2013 | modified 10. Jun 2024
filename: MySQL » Temporary In-Memory Instance