• Resolved dougrdotnet

    (@dougrdotnet)


    Setting up WordPress locally on my Mac testing server.
    Mac OS X 10.5
    Apache 2.2.6
    MySQL 4.1.2
    PHP 5.2.4
    WordPress 2.3.3
    All servers confirmed runnng normally.
    wp-config.php:

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'dougrdotnet');    // The name of the database
    define('DB_USER', 'root');     // Your MySQL username
    define('DB_PASSWORD', ''); // ...and password
    define('DB_HOST', 'localhost');    // 99% chance you won't need to change this value
    
    // You can have multiple installations in one database if you give each a unique prefix
    $table_prefix  = 'wp_';   // Only numbers, letters, and underscores please!
    
    // Change this to localize WordPress.  A corresponding MO file for the
    // chosen language must be installed to wp-content/languages.
    // For example, install de.mo to wp-content/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');
    
    /* That's all, stop editing! Happy blogging. */
    
    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>


    Confirmed that database settings as shown in config are correct – am able to connect to db using these settings through ColdFusion server as well as CocoaMySQL using root with blank pass. Have tried using pass just in case config not accepting empty string.
    What do you think?

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter dougrdotnet

    (@dougrdotnet)

    Just had a look at my PHP configurtion and noticed that the MySQL client version is diff from my actual server. Using PHP install from Leopard – could this be the issue:

    mysql
    MySQL Support	enabled
    Active Persistent Links 	0
    Active Links 	0
    Client API version 	5.0.45
    MYSQL_MODULE_TYPE 	external
    MYSQL_SOCKET 	/var/mysql/mysql.sock
    MYSQL_INCLUDE 	-I/usr/include/mysql
    MYSQL_LIBS 	-L/usr/lib/mysql -lmysqlclient
    
    Directive	Local Value	Master Value
    mysql.allow_persistent	On	On
    mysql.connect_timeout	60	60
    mysql.default_host	localhost	localhost
    mysql.default_password	no value	no value
    mysql.default_port	3306	3306
    mysql.default_socket	no value	no value
    mysql.default_user	root	root
    mysql.max_links	Unlimited	Unlimited
    mysql.max_persistent	Unlimited	Unlimited
    mysql.trace_mode	Off	Off

    This is NOT a “how-to-set-up-a-server” forum. Sorry.

    Make your server running with all the required components and then come back to ask WP related questions.

    Thread Starter dougrdotnet

    (@dougrdotnet)

    Hi Moshu, not asking how to set up my server, I know this. Please answer my first post, the remainder was soley for additional information. Are you up to that?

    There is nothing much to answer: if it displays an error message – it is a human mistake in the data entered into the config file. Period.

    There are more error messages… so the info in it should tell you exactly what the problem is.

    Thread Starter dougrdotnet

    (@dougrdotnet)

    Moshu, according to the WordPress “Before you Install” documentation I meet or exceed all specifications. So my server is running with all the required components. So, given the copious amount of information which you quickly shunned… any ideas?

    Thread Starter dougrdotnet

    (@dougrdotnet)

    Where may I find more error messages, have I missed a log file somewhere?

    No, you did NOT quote the error message that you get from WP.
    You just put its first line into the topic title here.
    If you got that one with 3 questions… can you answer a 120% YES to all of them?

    Thread Starter dougrdotnet

    (@dougrdotnet)

    Do you see an error in my config file provided in first post? The db name, user, pass, & host are confirmed correct.

    Thread Starter dougrdotnet

    (@dougrdotnet)

    That is the only error for which I received.

    Thread Starter dougrdotnet

    (@dougrdotnet)

    Moshu, dude, let’s be friends!

    Thread Starter dougrdotnet

    (@dougrdotnet)

    So you are looking for this:

    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.

    I have checked and confirmed these settings through Rails, ColdFusion, CocoaMySQL, and MySQL terminal.

    I assumed that you got only one error, but I know that WP can show other error messages, too – depending on what is screwed up in the config file or DB. That’s why I was asking for the exact error message!

    OK, now we know which one you got. And believe me, despite what the users always say (i.e. “confirmed correct”) – it is never correct. There is always a typo, a space, wrong db name, user not added to the db, etc.
    The error message NEVER lies: one of the 3 info pieces is false.

    Thread Starter dougrdotnet

    (@dougrdotnet)

    I have not checked for a space, let me do that real quick

    Thread Starter dougrdotnet

    (@dougrdotnet)

    Unfortunately, no additional spaces. Copied over with the original sample and selected within single quotes replacing with db values. Same issue. Hmmm… Well thanks for looking at it!

    Well, I do’t know. I have no idea how servers work, and don’t even want to know – although I have a local install using XAMPP: it’s convenient because your don’t have to struggle with all the components (apache, php, mysql etc.) – it installs everything in the right way.

    https://www.apachefriends.org/en/xampp-macosx.html

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Error Establishing DB connection’ is closed to new replies.