WordPress.org

Ready to get started?Download WordPress

Forums

WordPress and 1and1 - Localhost for the DB? (19 posts)

  1. seraphim
    Member
    Posted 8 years ago #

    Hello all,

    Trying to install WP on 1and1. I get the following error message.

    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.

    Do I set the DB_HOST to localhost for 1and1? Searched through the forum but couldn't find an answer.

  2. jennmiller
    Member
    Posted 8 years ago #

    1and1 does not use "localhost". You'll have to use the hostname they gave you ;)

  3. seraphim
    Member
    Posted 8 years ago #

    Thanks. Figured it out and it now works beautifully :)

  4. cainan
    Member
    Posted 8 years ago #

    Hi Seraphim,
    I am with 1and1 and in the MySQL Configuration control panel
    it mentions host name: localhost.

    Am I not looking in the right place? Where in 1and1 did you find host name?

    TIA

    Cainan

  5. harmonikan
    Member
    Posted 8 years ago #

    I've stared at username, password, and hostname for hours now and entered them in multiple times in as many configurations and am getting the same error message. Any ideas as to what might be happening?
    1and1 say my database is running fine...so it must be me, right?

  6. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Replace your password with XXXX's and paste the wp-config.php here. We can take a look too :)

  7. harmonikan
    Member
    Posted 8 years ago #

    Ok...I had to sleep for a while. I've finally been able to install WP but when I open my URL (www.markearley.org)I don't see WP anywhere.
    I'm extremely new to all of this. I've put a few objects into my website via Dreamweaver and wasn't sure how this would work by putting WP into my root directory on my server (1and1). Should I have put it into another directory? I don't think I have another directory. I'm ready to scrap the whole thing and start over.

  8. croila
    Member
    Posted 8 years ago #

    Harmonikan, when you log into your 1&1 control panel, navigate to "Websites and Applications", then "MySQL Administration". Then you you should find all your information for Database Name, User Name, Password, and Host Name.

    As you will see, 1&1 do not use localhost, but rather "dbXXX.oneandone.co.uk".

    Sounds to me like you should do a fresh install of WordPress. The root directory of your URL is absolutely fine to put it in.

    If you need any more help, let me know, because I've installed about about five different WordPress sites all using 1&1 hosting so find it fairly straightforward now.

    Kind regards
    Croila

  9. harmonikan
    Member
    Posted 8 years ago #

    Thanks for the information Croila...I'll try again soon. Must write a paper now.

  10. jsaulg
    Member
    Posted 8 years ago #

    Hi all,

    I have experienced the same problem with 1and1. Here's my wp-config.php. I checked my username etc. It still does not work ! Any help would be appreciated. Thanks !

    Jsaulg

  11. jsaulg
    Member
    Posted 8 years ago #

    oops... forgot this

    <?php
    // ** MySQL settings ** //
    define('db151107765', 'wordpress'); // The name of the database
    define('dbo151107765', 'username'); // Your MySQL username
    define('XXXXXX', 'password'); // ...and password
    define('db266.perfora.net', '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-includes/languages.
    // For example, install de.mo to wp-includes/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');
    ?>

  12. Jonowinn
    Member
    Posted 8 years ago #

    I installed on my 1and1 server, and it works fine. Your problem is that you didn't remove the example values. It needs to look like this:

    <?php
    // ** MySQL settings ** //
    define('db151107765'); // The name of the database
    define('dbo151107765'); // Your MySQL username
    define('XXXXXX'); // ...and password
    define('db266.perfora.net'); // 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-includes/languages.
    // For example, install de.mo to wp-includes/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');
    ?>

    You had multiple values returned, you need to just list the real ones.

  13. jsaulg
    Member
    Posted 8 years ago #

    Thanks Jonowinn. I followed your advice and still the same error message:

    ***
    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 DB_HOST. This could mean your host's database server is down.
    ***

    I checked the database server and the status is Ready. I changed the password in my settings, and still nothing...

    Very frustrating !

  14. archshrk
    Member
    Posted 8 years ago #

    This is the correct format

    define('DB_NAME', 'db151107765'); // The name of the database
    define('DB_USER', 'dbo151107765'); // Your MySQL username
    define('DB_PASSWORD', 'XXXXXX'); // ...and password

  15. jsaulg
    Member
    Posted 8 years ago #

    Eureka !! That worked ! Thanks archshrk !

  16. NickA13
    Member
    Posted 8 years ago #

    Was thinking about using WordPress and 1and1, and I found this thread. Just wondering how well the 1and1 setup in general conforms to the WordPress requirements. Any feedback would be great.

    Thanks!

  17. archshrk
    Member
    Posted 8 years ago #

    I haven't had any problems with 1and1 using WP.

  18. bevans
    Member
    Posted 8 years ago #

    Same here. Works great on 1and1 Developer account IF you understand the MySQL setup procedure.

  19. thadhubbard
    Member
    Posted 8 years ago #

    I'm attempting to install WordPress version 2.01 on 1and1. I've installed ver. 1.5 with no problem. When I go to http://avianflufiles.com/wp-install/wp-admin/install.php I get this error message:

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'home' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'hack_file' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'active_plugins' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'permalink_structure' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'category_base' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'template' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'template' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'rewrite_rules' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'rewrite_rules' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'siteurl' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'html_type' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'blog_charset' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'posts_per_page' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'what_to_show' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'gmt_offset' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'gmt_offset' LIMIT 1

    WordPress database error: [Table 'db155479498.wp_posts' doesn't exist]
    SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <= '2006-03-18 16:49:59' AND (post_status = "publish") AND post_status != "attachment" GROUP BY wp_posts.ID ORDER BY post_date DESC

    WordPress database error: [Table 'db155479498.wp_options' doesn't exist]
    SELECT option_value FROM wp_options WHERE option_name = 'gzipcompression' LIMIT 1

    Here's my wp-config.php:

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

    The root directory on the website is:

    Destination As a home directory : /avianflufiles/index.php

    I'm at a loss. Can anyone help?

Topic Closed

This topic has been closed to new replies.

About this Topic