I don’t know what GCP is, but maybe the MySQL service is running on a different port there. Check the details you have for the connection again – including the host and the port.
Hello
The port is 3306, defaut port
I think their is mysql databse problems
Hello eveyrobdy
First of all, thank you for your help.
I enable debug mode and I have this error:
Warning: mysqli_real_connect(): (HY000/2002): Permission denied in /var/www/html/wordpress/wp-includes/class-wpdb.php on line 1988
Permission denied
I have checked all permissions!
And from my vm, I success to connect to the managed mysql db:
[root@vm]# mysql -h 10.198.46.64 -u wordpressuser2 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 119798
Server version: 8.0.40-google (Google)
mysql>
here is the line 1988 of class-wpdb.php :
if ( WP_DEBUG ) {
mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
Oh it works!
When I execute this command: setsebool -P httpd_can_network_connect 1
Thank you very much
@mahmoudagwa901 Please stop using ChatGPT or a similar tool to generate replies. That is not welcome as it is better for forum volunteers such as yourself to use real replies in their own words.
Hi,
Add this to your wp_config.php to see what’s going wrong:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );