Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1105407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:37:41+00:00 2026-05-17T01:37:41+00:00

This is driving me nuts! I have a test instance of WordPress installed on

  • 0

This is driving me nuts! I have a test instance of WordPress installed on my MacBook Pro, which has suddenly stopped working. If I head for http://localhost:9003/wp-admin/ I get:

Error establishing a database connection

This either means that the
username and password information in
your wp-config.php file is incorrect
or we can’t contact the database
server at localhost. This could mean
your host’s database server is down.

Are you sure you have the correct
username and password?

Are you sure
that you have typed the correct
hostname?

Are you sure that the
database server is running?

If you’re
unsure what these terms mean you
should probably contact your host. If
you still need help you can always
visit the WordPress Support Forums.

Hmmph! I haven’t touched the config for ages. Here’s how the relevant lines look right now:

define('DB_NAME', 'wordpress');
define('DB_USER', 'wordpress');
define('DB_PASSWORD', 'wordpress');
define('DB_HOST', 'localhost');
$table_prefix  = 'wp_';

The values are all good:

$ mysql -h localhost -u wordpress --password=wordpress \
> wordpress -e 'select user_login from wp_users'
+------------+
| user_login |
+------------+
| simon      |
+------------+

There’s nothing in the MySQL error log, nor in Apache’s error log. I’ve tried using a different MySQL user and a different database, but I get the same error. I’m scuppered – any WordPress gurus out there know what I’m missing?


Output of php –ri mysql:

$ php --ri mysql

mysql

MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $

Directive => Local Value => Master Value
mysql.allow_persistent => On => On
mysql.max_persistent => Unlimited => Unlimited
mysql.max_links => Unlimited => Unlimited
mysql.default_host => no value => no value
mysql.default_user => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => /var/mysql/mysql.sock => /var/mysql/mysql.sock
mysql.connect_timeout => 60 => 60
mysql.trace_mode => Off => Off
mysql.allow_local_infile => On => On
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:37:42+00:00Added an answer on May 17, 2026 at 1:37 am

    This is exactly the problem, and the solution.

    http://appletoolbox.com/2010/08/phpmysql-broken-after-security-update-2010-05-fix/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.