• Resolved Jonathan Landrum

    (@jonlandrum)


    Hey everybody,

    I know that similar topics have been covered before, but it just won’t work for me, no matter what combinations of host names I try.

    (citing last post). Here’s my wp-config:

    <?php
    // ** MySQL settings ** //
    define('jonlandr_wordpress', 'wordpress');
    define('jonlandr_wordpre', 'username');
    define('*****', 'password');
    define('localhost', 'localhost');

    // ** Stop editing ** //

    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    It all looks great to me. And I’ve deleted and re-made my username and database two or three times using cPanel.

    $dbh=mysql_connect ("localhost", "jonlandr_wordpre", "<PASSWORD HERE>") or die ('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db ("jonlandr_wordpress");

    Is there a wait period before this database becomes available, kind of like the wait period when starting a new site while the host creates your file? Or am I still doing something wrong? The URL is JonLandrum.com

    Any information is greatly appreciated,
    Jonathan

Viewing 12 replies - 1 through 12 (of 12 total)
  • there are many threads along these lines:

    http://wordpress.org/support/topic/32503

    Do a more specific search on keywords, hopefully someone with moreknowledge can help.

    What I can answer is the propagation of a db is pretty immediate – as soon the account is made, it’s ready for use. Then you enter the details in wp-config.php and run the installer.

    Try installing phpMyAdmin, also. That’s invaluable for database diagnostics (and management) when you don’t have shell access.

    This may be a dumb question but . . . did you “add” the user to the database?

    The way I do it in cpanel is
    1) create database
    2) create user
    3) add user to database

    As long as you do those three steps everything works.

    skippy I believe he is using Cpanel which tends to come with a farily recent version of phpmyadmin but it seems to be more a config problem. I’m not sure if the db details are correct in the wp-config.php

    Thread Starter Jonathan Landrum

    (@jonlandrum)

    >>This may be a dumb question but . . . did you “add” the user to the database?

    Oh, yes. I did that, too.

    Thread Starter Jonathan Landrum

    (@jonlandrum)

    >>I’m not sure if the db details are correct in the wp-config.php

    Well, I’m using ‘localhost’ as the db name. I’ve also tried DBI:mysql:jonlandr_wordpress:localhost.

    Thread Starter Jonathan Landrum

    (@jonlandrum)

    Jinsan,
    http://wordpress.org/support/topic/32503 is the string I was quoting!

    here’s my wp-config, maybe it will help, obviously edited the info 🙂

    <?php
    // ** MySQL settings ** //
    define('DB_NAME', 'cpanelaccountname_wordpress'); // The name of the database
    define('DB_USER', 'cpanelaccountname_wordpress'); // Your MySQL username
    define('DB_PASSWORD', 'alphanumericapass'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    /* Stop editing */

    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    Note that my cpanel username comes first, then and underscore, then the database details such as the username and the database password, both are the same for this example

    Thread Starter Jonathan Landrum

    (@jonlandrum)

    Holy Cow. I feel like such an idiot. Do you know what I did? I replaced DB_HOST with my host, etc. Hmm, first-timers; gotta love us!

    Thanks everybody! You don’t know how great it is to have people like you all helping folks like me who have never used php or MySQL.

    Jonathan

    edit: never mind, looks like you have it solved. 🙂

    live and learn, so next time someone has this problem you can step up and let them know as you have done 🙂

    I take it the install worked? remember to delete the install.php and install-helper.php once you have successfully logged in to your site. Call me ultra paranoid, but you don’t need tose files if your install is successful.

    have fun

    Thread Starter Jonathan Landrum

    (@jonlandrum)

    Hey, thanks. I wouldn’t have thought of that, either. And, yes, I’ll stay on this forum to learn new tricks and help other newbies!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Beating a dead horse to death…’ is closed to new replies.