New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MySQL Sandbox to default install #835
Comments
Big +1 for this. |
I just realised I could make that switching code a bunch simpler: $current_db = '5.6.17';
if ( $current_db ) {
define( 'DB_USER', 'msandbox' );
define( 'DB_PASSWORD', 'msandbox' );
define( 'DB_HOST', '127.0.0.1:' . str_replace( '.', '', $current_db ) );
exec( '~/sandboxes/msb_' . str_replace( '.', '_', $current_db ) . '/start' );
if ( false === strpos( $GLOBALS['argv'][0], 'install.php' ) ) {
register_shutdown_function( 'exec', '~/sandboxes/msb_' . str_replace( '.', '_', $current_db ) . '/stop' );
}
} else {
define( 'DB_USER', 'wp' );
define( 'DB_PASSWORD', 'wp' );
define( 'DB_HOST', 'localhost' );
}
define( 'DB_NAME', 'wordpress_unit_tests' );
define( 'DB_CHARSET', 'utf8' );
define( 'DB_COLLATE', '' ); It needs some sanity checking to make sure the version exists. |
The default DB config provided by VVV should be MariaDB 10.0 (see #876). We should also provide a config for MySQL Sandbox as part of |
This would be useful, but as it hasn't been touched in a year and we now have the VVV Utilities system, there's no reason it couldn't be added that way so I'm closing this out |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
MySQL Sandbox is a super useful tool for rapidly installing and configuring different versions of MySQL, to test against.
Also, I'm not sure if this could be turned into a more general solution, but my
wp-tests-config.php
includes this chunk, for quickly switching between DB versions:The text was updated successfully, but these errors were encountered: