Open adamziel opened 2 months ago
Let me know if there's any additional info you need from me.
@adamziel I've just tried that on my local in Studio and I couldn't reproduce it.
docker run --name studio-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw -d circleci/mariadb:10.3.23
wp-config.php
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "my-secret-pw";
$dbname = "circle_test";
// Initialize mysqli instance $mysqli = mysqli_init();
if (!$mysqli) { die('mysqli_init failed'); }
// Establish connection if (!mysqli_real_connect($mysqli, $servername, $username, $password, $dbname)) { die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); } echo 'Success... ' . $mysqli->host_info . "\n";
$mysqli->close(); die;;
6. Refresh page and notice:
Success... 127.0.0.1 via TCP/IP
Interesting! @zzap, what's your mysql version? Also @wojtekn would you also try vs code?
mysql Ver 8.0.36-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
@adamziel it works well for me in Visual Studio Code, too:
@zzap's VS Code extension crashed when running a MySQL-connected WordPress. We've narrowed it down to the reproduction case below. It's probably also present in wp-now and Studio – CC @sejas @kozer @wojtekn. It's most likely Asyncify-related, here's a doc page on how to debug and fix those: https://wordpress.github.io/wordpress-playground/architecture/wasm-asyncify Even posting a stack trace here would go a long way.