Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey John,

    Great question — and I understand the confusion. Just to clarify: the wp_users table is where your site’s user accounts are stored, but it’s not related to the database connection credentials.

    The database credentials that WordPress uses to connect to MySQL are stored in the wp-config.php file — specifically:

    phpCopy

    Edit

    define('DB_NAME', 'your_database_name'); define('DB_USER', 'your_database_username'); define('DB_PASSWORD', 'your_database_password'); define('DB_HOST', 'localhost');

    If those values are incorrect (for example, wrong DB_USER or DB_PASSWORD), you’ll get the “Error establishing a database connection” message.

    The wp_users table just controls access to WordPress admin — not access to the database itself.

    If you’re troubleshooting this error, we recently shared a complete guide that breaks down both common causes and server-level solutions in plain language — feel free to check it out : https://brandpex.com/how-to-fix-the-wordpress-error-establishing-a-database-connection/

    Hey John,

    Great question — and I understand the confusion. Just to clarify: the wp_users table is where your site’s user accounts are stored, but it’s not related to the database connection credentials.

    The database credentials that WordPress uses to connect to MySQL are stored in the wp-config.php file — specifically:

    phpCopy

    Edit

    define('DB_NAME', 'your_database_name'); define('DB_USER', 'your_database_username'); define('DB_PASSWORD', 'your_database_password'); define('DB_HOST', 'localhost');

    If those values are incorrect (for example, wrong DB_USER or DB_PASSWORD), you’ll get the “Error establishing a database connection” message.

    The wp_users table just controls access to WordPress admin — not access to the database itself.

    If you’re troubleshooting this error, we recently shared a complete guide that breaks down both common causes and server-level solutions in plain language — feel free to check it out on the “how to fix the WordPress error establishing a database connection”.

    You’re seeing the “Error establishing a database connection” because your MySQL user has exceeded the maximum allowed database connections — specifically:

    User ‘xxxxxxxxx’ has exceeded the ‘max_user_connections’ resource (current value: 100)
    

    This is not an issue with credentials (username/password/hostname), but rather a server resource limit imposed by your hosting provider.

    What This Error Means

    Your hosting account is limited to 100 simultaneous MySQL connections, and currently that limit is being hit. This can cause WordPress to fail connecting to the database, leading to that error message.

    Step-by-Step Fix
    1. Temporary Fix: Restart MySQL or Wait

    If you’re on a shared or managed host, try:

    • Waiting for a few minutes — connections may close automatically.
    • Contacting your host to restart MySQL or kill idle connections.

    If you’re on a VPS or dedicated server, run:

    sudo systemctl restart mysql
    

    2. Optimize and Reduce Simultaneous Connections

    Too many connections usually happen due to:

    • Poorly coded plugins or themes
    • High traffic spikes
    • Slow queries or unclosed DB connections

    ➤ Fix it by:

    • Disabling all plugins temporarily:
      Rename wp-content/plugins to plugins_old via FTP or cPanel
    • Switch to a default theme (like TwentyTwentyThree) temporarily
    • Add this to your wp-config.php to limit persistent DB connections:
    define('WP_ALLOW_REPAIR', true);
    

    Then visit:
    https://yourdomain.com/wp-admin/maint/repair.php 3. 📈 Monitor & Limit Simultaneous Connections

    If you’re allowed to access your my.cnf or MySQL config, you can:

    • Check how many active connections exist:
    SHOW PROCESSLIST;
    
    • Kill idle ones manually:
    KILL [connection_id];
    
    • Increase the limit (if on VPS or dedicated):
    [mysqld]
    max_user_connections=200
    

    ⚠️ Note: You can’t increase max_user_connections on shared hosting. Contact your hosting provider for help or upgrade your plan.

    4. Clean & Optimize Your DB

    Install a plugin like:

    • WP-Optimize
    • Advanced Database Cleaner

    These help by:

    • Removing stale transients
    • Reducing auto-saves and post revisions
    • Cleaning overhead and garbage entries

    5. 🛠️ Use Persistent Object Caching (Advanced)

    If your hosting supports Redis or Memcached, enabling object caching can reduce DB load. 6. ☁️ Consider Moving to Higher Resource Hosting

    If this error keeps repeating, it’s a clear sign that your current hosting plan is insufficient. Consider:

    • Moving to a VPS (like DigitalOcean, Cloudways)
    • Or Managed WordPress hosting (like Kinsta, WP Engine)
    • This reply was modified 11 months, 2 weeks ago by pradeepsinghh.
    Thread Starter pradeepsinghh

    (@pradeepsinghh)

    I am using Gwangi theme which is basically community/social based theme.
    I just need to put some functionality where admin can assign the BP Membership Type while Approving the User Signup Request. If it is possible.

    Thread Starter pradeepsinghh

    (@pradeepsinghh)

    Thanks Mostafa

    Thread Starter pradeepsinghh

    (@pradeepsinghh)

    No Reply on Support

    i am also looking for the solution of multiple Stop-id.

    • This reply was modified 6 years, 5 months ago by pradeepsinghh.
Viewing 7 replies - 1 through 7 (of 7 total)