WordPress.org Forums » All Posts https://wordpress.org/support/forum/installation/feed/ Wed, 14 May 2025 21:00:42 +0000 https://bbpress.org/?v=2.7.0-alpha-2 en-US https://wordpress.org/support/topic/mysql-ubuntu-help/#post-18461419 <![CDATA[Reply To: Mysql/Ubuntu help]]> https://wordpress.org/support/topic/mysql-ubuntu-help/#post-18461419 Mon, 12 May 2025 12:08:11 +0000 ritheshsatheesh Hi, hope you are doing well. If possible try using docker.
Heres a blog about how to do it https://www.docker.com/blog/how-to-dockerize-wordpress/.
More guides https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-docker-compose

]]>
https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18458940 <![CDATA[Reply To: Error establishing a database connection when I try to install wordpress]]> https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18458940 Fri, 09 May 2025 18:34:08 +0000 Syed Shaan Haider 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 );

]]>
https://wordpress.org/support/topic/mysql-ubuntu-help/#post-18457295 <![CDATA[Reply To: Mysql/Ubuntu help]]> https://wordpress.org/support/topic/mysql-ubuntu-help/#post-18457295 Thu, 08 May 2025 20:23:53 +0000 threadi This actually has little to do with WordPress, but rather with the system you use to provide the resources WordPress needs. Instructions for installing MySQL on Ubuntu can be found here, for example: https://documentation.ubuntu.com/server/how-to/databases/install-mysql/index.html – you must then create a database and a database user for the installation, which you must then enter when installing WordPress. I think this is described here in the instructions: https://pheonixsolutions.com/blog/how-to-setup-mysql-and-create-a-user-on-ubuntu-24-04/

If you have further questions about this, I would recommend that you contact an Ubuntu community.

Alternatively, you can also use another local system to install WordPress there. Possible options include localWp or a LAMP stack under Linux: https://wiki.ubuntuusers.de/LAMP/

]]>
https://wordpress.org/support/topic/mysql-ubuntu-help/#post-18457239 <![CDATA[Mysql/Ubuntu help]]> https://wordpress.org/support/topic/mysql-ubuntu-help/#post-18457239 Thu, 08 May 2025 19:50:05 +0000 baylors I realize this isn’t WordPress’ problem, but I’m having a devil of a time installing a WordPress site on my homebrew server.

I’m using Ubuntu 24.04 (tried multiple OS’s as well) and when I install mysql, I don’t get prompted for an admin password, soooooo when I try to install WordPress, it bombs due to incorrect mysql username/password.

I’ve tried every trick multiple Google searches have told me to use to no avail.

Any suggestions? Thank you in advance!

]]>
https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18450221 <![CDATA[Reply To: Error establishing a database connection when I try to install wordpress]]> https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18450221 Mon, 05 May 2025 10:41:05 +0000 isabelthomas Sounds like a database config issue double-check your wp-config.php settings and try connecting via a PHP script to confirm access.

]]>
https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18450195 <![CDATA[Reply To: Error establishing a database connection when I try to install wordpress]]> https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18450195 Mon, 05 May 2025 10:34:58 +0000 Support Moderator @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.

]]>
https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449976 <![CDATA[Reply To: Error establishing a database connection when I try to install wordpress]]> https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449976 Mon, 05 May 2025 08:38:08 +0000 Mahmoud Agwa @maxwello62

The issue is resolved.
It was caused by SELinux blocking Apache from connecting to external databases.
The fix was to run:

setsebool -P httpd_can_network_connect 1

Hopefully this helps anyone who runs into the same issue.
Let me know if you need any further assistance

]]>
https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449938 <![CDATA[Reply To: Error establishing a database connection when I try to install wordpress]]> https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449938 Mon, 05 May 2025 08:20:53 +0000 maxwello62 Oh it works!
When I execute this command: setsebool -P httpd_can_network_connect 1

Thank you very much

]]>
https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449842 <![CDATA[Reply To: Error establishing a database connection when I try to install wordpress]]> https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449842 Mon, 05 May 2025 07:42:41 +0000 maxwello62 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 );

]]>
https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449825 <![CDATA[Reply To: Error establishing a database connection when I try to install wordpress]]> https://wordpress.org/support/topic/error-establishing-a-database-connection-when-i-try-to-install-wordpress/#post-18449825 Mon, 05 May 2025 07:35:23 +0000 maxwello62 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>

]]>