• Hi

    Just installed latest wordpress for one of my customers.
    Windows server 2003
    MySql 5.0
    MySql ODBC 3.51
    PHP 5

    Just ran the install.php and it errors saying cannot connect to database

    wp-config file was edited correctly giving server, database name, user, and pass.

    I can set up an ODBC and this connects immediately with the same details as supplied in the wp-config

    I can log into the database with MySql Front with the same details

    Any ideas guys?

    Many thanks
    Patrick

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter patdundee

    (@patdundee)

    Looking through the posts this seems to be a wide spread issue. Has any one got a resolution?

    Patrick

    I’m having the same problem…any one have any solutions?

    ~Leslie

    Nm…I got it. ?? I had things written wrong in the wp-config.php. Sorry to bother everyone.

    Patdundee you’re POSITIVE the info in wp-config is correct? The DB host name?

    Thread Starter patdundee

    (@patdundee)

    As far as I am aware it is. As mentioned I can actually connect via ODBC and I have a connection script in VBScript and in PHP and they both connect with no problem

    Please see below config below

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’,’palm’); // The name of the database
    define(‘DB_USER’,’xxxxxx’); // Your MySQL username
    define(‘DB_PASSWORD’,’xxxxxx’); // …and password
    define(‘DB_HOST’,’localhost’); // 99% chance you won’t need to change this value
    define(‘DB_CHARSET’,’utf8′);
    define(‘DB_COLLATE’,”);

    // Change each KEY to a different unique phrase. You won’t have to remember the phrases later,
    // so make them long and complicated. You can visit https://api.www.ads-software.com/secret-key/1.1/
    // to get keys generated for you, or just make something up. Each key should have a different phrase.
    define(‘AUTH_KEY’, ‘m=.k/w(o,?{6({rUCk|.Z$:U\’RL]]Nc6!aRW:T1\\F<Y)9Kis7m3.yFaU&VqX\’f#2’); // Change this to a unique phrase.
    define(‘SECURE_AUTH_KEY’, ‘J]bM@m3[63a=Ii?aufLC9jOzvQ=[email protected](HcFKJmc^87q&.HGpkp^X#bLd$2p’); // Change this to a unique phrase.
    define(‘LOGGED_IN_KEY’, ‘\\CL|YbotcN\\^Ec5<_wr}v1<DT?*%(tskIFP+6+;Rp~Xg!?;\'qIGG5|<Z{jYY@O’); // Change this to a unique phrase.

    // 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’, ‘uk’);

    /* That’s all, stop editing! Happy blogging. */

    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
    require_once(ABSPATH . ‘wp-settings.php’);
    ?>

    One error
    define ('WPLANG', 'uk');
    this should be
    define ('WPLANG', '');

    Also, usually a windows host does not use
    “localhost” but certainly can.

    Who’s your host?

    Thread Starter patdundee

    (@patdundee)

    Hi Guys
    Located the issue it was a port error in the Host Line

    Now that works OK But (PART 2 )

    Go to the install.php and the page loads absolutely fine (Had to put me sunnies on) Bright white page but guess what No Install set up page

    Another host issue?

    What’s your URL?

    Error establishing a database connection
    hi i am new to use wordpress pls help me asap…
    i have given the db_name ,user name and passwords..but i could not..

    <?php
    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘db_name’); // The name of the database
    define(‘DB_USER’, ‘user_name’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘xxxxxx’); // …and password
    define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value
    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    // Change each KEY to a different unique phrase. You won’t have to remember the phrases later,
    // so make them long and complicated. You can visit https://api.www.ads-software.com/secret-key/1.1/
    // to get keys generated for you, or just make something up. Each key should have a different phrase.
    define(‘AUTH_KEY’, ‘1234567890!@#$%’); // Change this to a unique phrase.
    define(‘SECURE_AUTH_KEY’, ‘!@#$%^&*1234’); // Change this to a unique phrase.
    define(‘LOGGED_IN_KEY’, ‘)(*&^%$#@!’); // Change this to a unique phrase.

    // 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. */

    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);
    require_once(ABSPATH . ‘wp-settings.php’);
    ?>
    Error establishing a database connection

    My problem was more with HSphere than WordPress.

    -To do the job, Go to MySQL Server and add a database.
    -Name it anything you want.
    -Create a user with DBA powers for the DB.
    -Let’s assume your website account is MYDOMAIN.COM and you’ve chosen to name your DB, “WPDB” and you user, “BIGBOSS”.
    -You’re going to end up with something like this:
    -Database name: MYDOMAI_WPDB
    -User name: MYDOMAI_BIGBOSS
    -Password: whatever you chose
    -Path to the domain: localhost
    This may not be correct. If you go back to the MySQL Server screen, you’ll see the correct path at the top of the box. Copy and paste that path into your wp-config.php file. This is where I messed up.
    -Now go below and create some jaw-cruncher KEYs. The utility mentioned works great.

    Now, can anyone tell me if I’m supposed to restrict the access to the file area where WordPress lives? If so, what level?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘No connection to database’ is closed to new replies.