SELinux was contributing to the problem. The main issue was that an HTML page was attempting to talk to another port on the localhost. I would not have seen the problem if the HAProxy was running on a separate host.
The log was revealed in /var/log/messages, where I should have checked but did not considering I didn’t expect it. Fail on my part. The log looked like this:
setroubleshoot: SELinux is preventing the http daemon from connecting to network port 3306 For complete SELinux messages.
SELinux should not have been running to begin with, so I simply disabled it:
echo 0 > /selinux/enforce
To maintain this state upon reboot, simply edit the SELINUX line in /etc/sysconfig/selinux to say SELINUX=permissive
rather than SELINUX=enforced
. This will log alerts but not stop any processes. To disable SELinux completely, just replaced it with SELINUX=disabled
instead.
Related Posts:
- Can’t open the mysql.plugin table. Please run mysql_upgrade to create it
- Differences between utf8 and latin1
- What specific database privileges does WordPress need?
- What is the most secure way to set up the MySQL user in WPMU?
- WordPress installation on valet php 8 (PHP Fatal error: Uncaught mysqli_sql_exception Table ‘wp_options’ doesn’t exist in wp-includes/wp-db.php:2056)
- Access Denied for User ‘root’@’localhost’ (using password: YES) – No Privileges?
- Cannot add or update a child row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- Cannot delete or update a parent row: a foreign key constraint fails
- ERROR 2003 (HY000): Can’t connect to MySQL server on localhost (10061)
- Rename a column in MySQL
- Not unique table/alias
- Install mysql-python (Windows)
- Authentication plugin ‘caching_sha2_password’ cannot be loaded
- #1055 – Expression of SELECT list is not in GROUP BY clause and contains nonaggregated column this is incompatible with sql_mode=only_full_group_by
- Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
- Disable ONLY_FULL_GROUP_BY
- MySQL WHERE IN ()
- Is there an SQLite equivalent to MySQL’s DESCRIBE [table]?
- SELECT list is not in GROUP BY clause and contains nonaggregated column …. incompatible with sql_mode=only_full_group_by
- Host ‘xxx.xx.xxx.xxx’ is not allowed to connect to this MySQL server
- difference between primary key and unique key
- grabbing first row in a mysql query only
- How to export a mysql database using Command Prompt?
- mysqld_safe Directory ‘/var/run/mysqld’ for UNIX socket file don’t exists
- Order a MySQL table by two columns
- MySQL Error #1133 – Can’t find any matching row in the user table
- How can I prevent SQL injection in PHP?
- Best way to store an array in MySQL database?
- MySQL date formats – difficulty Inserting a date
- How to solve “Error: MySQL shutdown unexpectedly”?
- How to grant remote access permissions to mysql server for user?
- How to check if mysql database exists
- #1062 – Duplicate entry for key ‘PRIMARY’
- How can I convert a string to a float in mysql?
- Is there a Profiler equivalent for MySql?
- How to use greater than operator with date?
- Drop all databases in MySQL
- MySQL – count total number of rows in php
- How to get the count of each distinct value in a column?
- How to replace the domain name in a WordPress database?
- Optimize WordPress Query that take 5 seconds to execute
- MySQL Replication Latency Issues in wp-admin pages
- Increment value (value = value+1) of $wpdb->update
- How can I debug my database connection for unit testing?
- Extending the database
- SQL query not working in alphabetical post title/content search
- Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)
- Importing MariaDB into Mysql in WordPress
- How to get a Google maps SQL->XML->map marker tutorial to work in WordPress
- Keeping database within limits, please help!
- Converting mysql to $wpdb
- Update a WordPress post or page takes 60+ seconds
- HTML Entities in Post Title
- add_post_meta does not respect the content
- Modify MySQL Query Based on Dropdown Menu
- Select multiple wp_postmeta keys with single select
- How can I fix WordPress installation errors?
- Backing up and restoring multiple sites efficiently
- Alter wp_post table vs. post_meta performance/speed
- Are these WordPress tables safe to add indexes to?
- SQL syntax error when getting data for a url
- Can’t run database query
- Import CSV to MySQL, with custom registration field information
- Locally restoring a ManageWP full site backup
- WordPress doesn’t save changes some times
- Update Custom Post Type Taxonomies with SQL
- Custom SELECT Query not returning the_title and the_permalink
- Why doesn’t custom mysql query return results? Is syntax correct?
- Will reducing mysql permissions hinder WP function? [duplicate]
- Insert two row in wordpress database
- Php Mysql Terms
- Export SQL query based on custom field?
- Wpdb query with dynamic table name
- Lock wait timeout exceeded; try restarting transaction
- How to install WordPress from hosting service with mysql database from Compute Engine GCP?
- 504 Gateway Time-out after custom plugin inserts data into mysql database
- WordPress fails to install with “Can’t Select Database” Error (WAMPServer)
- What is this? MySQL array?
- What is the MYSQL Query to bulk update the canonical URL of specific categories of posts in WordPress?
- Why should be SQL keywords, like CREATE TABLE and UPDATE, must be uppercase in WordPress?
- Add row to SQL array
- SELECT statement wrong?
- mysql query on wp_user and user_meta problem
- $wpdb post type and term query only works when there are no dashes or spaces in the term slug and title
- Use custom query if main search query returns zero results in wordpress
- How to get Attachments(image) with specific width\height ratio
- get_results() query not working only when entering strings
- Geographical proximity query using post_meta
- Can I use mysql queries to replace query_posts()?
- Apache Redirect based on WordPress permissions
- Add value to array in database
- Datatabase error: Commands out of sync
- How to Import Multiple Values in custom field
- Making CURDATE() recognize current_time()
- How should I troubleshoot a database serialization issue with a WordPress migration
- Global MySQL replacing of text patterns/matches
- Why does the MySQL command line tool ignore the –port parameter?
- Postgres equivalent to MySQL’s \G?
- Possible SQL injection. How to locate and fix?