You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does it work with define( 'DB_HOST', 'localhost:<port>' );? If it's just localhost, PHP will try to use a unix socket (which lives in /var/run/mysqld/mysql.sock by default) instead of connecting over the network. Perhaps mounting /var in the VFS would do the trick?
For now the latter will do. Later on we might need access to more unix socket to support other PHP extensions. All of this hinges on Emscripten's ability to communicate through these sockets, though. If it cannot easily do it, we'll need to find a way to always trigger the network mode
It is weird that it doesn't work with the port, though. I wonder if WordPress strips before passing the host string as an argument somehow.
define( 'DB_HOST', '127.0.0.1' );
works as expected. However,define( 'DB_HOST', 'localhost' );
produces this error:From WordPress/wordpress-playground#360 (review)
Done is:
wp-now
can connect to a MySQL database on 'localhost'The text was updated successfully, but these errors were encountered: