WordPress.org

Ready to get started?Download WordPress

Forums

Install and connect to database problem (17 posts)

  1. lovefishing
    Member
    Posted 3 years ago #

    Hi all

    I'm trying to install wordpress 3.0.3 to the root of a domain with a new hosting provider who doesnt use the cpanel interface. the use something called Powered by Helm : Version 3.2.19

    They are using mysql 5

    In their control panel I can great a database and user and connect to the database as that user via myphpadmin no problem.

    Once in there I see my database but no database tables

    I don't think they use localhost but use the following

    mysql01.welcometothenetwork.com:3308
    Internal Connection Host: mysql01 port 3303

    When I ping and get a resulting IP no which I input into wp-config.php

    I transfered all my wordpress install files via ftp to the root of the hosting domain input my 4 variables into the wp-config.php file unloaded it and ran the install ;

    http://www.mydomain.com/wp-admin/install.php

    It didnt work with localhost or the IP number of the one from the pingtest

    Copy of my typical wp-config.php settings below;

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');

    /** MySQL database username */
    define('DB_USER', 'anyname'); - name of user i setup

    /** MySQL database password */
    define('DB_PASSWORD', '12345'); - random password i setup

    /** MySQL hostname */
    define('DB_HOST', 'localhost'); - or IP no of supposed host

    So I tried both localhost and the IP of the host suggested by the support team who host the domain but no luck.

    Any suggestions would be really appreciated .

    Thanks

  2. 2ells
    Member
    Posted 3 years ago #

    Just a guess, but have you tried setting DB_HOST to mysql01

    When I run myphpadmin it displays the name of the host in the top left hand corner of the main pane (in my case locahost). What does it say there when you run myphpadmin?

  3. lovefishing
    Member
    Posted 3 years ago #

    thanks for your reply,

    yes i tried DB_HOST to mysql01 and DB_HOST to mysql01:3303 with the port number but again didnt work

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'nameigaveit'); also created a new one and tried that

    /** MySQL database username */
    define('DB_USER', '123456');

    /** MySQL database password */
    define('DB_PASSWORD', '123456');

    Created a new user and password

    /** MySQL hostname */
    define('DB_HOST', 'mysql01:3303'); and tried with port no mysql01:3303

    None of the above worked.

    I can see the database and loginto it with myphpadmin and the above username and password . It has no tables or anything but it all seems to be there. And the wordpress install files are at the root of the domain ready to go.

    Don't know what to try next and the hosting guys are being as helpful as the can.

  4. 2ells
    Member
    Posted 3 years ago #

    When you say you ran http://www.mydomain.com/wp-admin/install.php and it didn't work, what actually happens i.e. do you get an error message or just a blank page?

  5. maoski
    Member
    Posted 3 years ago #

    did you try

    define('DB_HOST', 'mysql01.welcometothenetwork.com:3308
    ');

  6. lovefishing
    Member
    Posted 3 years ago #

    Thanks maoski

    yes i tried the aswell a couple of times

    define('DB_HOST', 'mysql01.welcometothenetwork.com:3308
    ');

    Im out of ideas on this one. May have to move hosting providers as I have no problem with others

  7. lovefishing
    Member
    Posted 3 years ago #

    Thanks 2ells

    i get the following error;

    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 mysql01.welcometothenetwork.com:3308. 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?

    I've recreated the database and user and tried the two variations of the DB host

  8. datasoftict
    Member
    Posted 3 years ago #

    Try running this without the port number, just the address of the mysql server.

  9. lovefishing
    Member
    Posted 3 years ago #

    yes tried both variations of the host with and without the port number aswell . In myphpadmin the sqlserver>mysql01:3303 . and I can login to the database as the user I created so all the variables are there.

    mysql01.welcometothenetwork.com:3308 pings fine.

    No tables in the database, does that make any difference?

    Cant get this site installation of the starting blocks.

    I have a number of WordPress sites hosted with doteasy.com and no problems at all. They use Fantastico one-click install script though which seem to do it all for you.

    My next move when I get time is to try this test provided by this link.

    http://www.webune.com/forums/testing-mysql-database-connection-script.html

  10. datasoftict
    Member
    Posted 3 years ago #

    The install procedure should create your tables, if it can find the server.

    Just to clear this in my mind, phpmyadmin connects fine. You have a user and paswoword set up as well? What 'host' name do you have for your users when looking at the phpmyadmin? Is there a root entry, if so what is it's host?

  11. Tara
    Member
    Posted 3 years ago #

    -First, double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.

    -Then check that you don't need to change the database host from "localhost" to something else. You can get that info from your hosting provider.

    -Check you have actually created a database with the same database name as is in your wp-config.php file.

    -Last, but not least, if all that information is correct your database probably has a problem with it and you may need to contact your web hosting (unless you are your own server).

    There are also many threads on this topic on these forums: http://wordpress.org/search/Error+establishing+a+database+connection?forums=1

    Also, see if this video helps: http://educhalk.org/blog/2009/03/error-establishing-a-database-connection-how-to-fix-this-wordpress-error/

  12. lovefishing
    Member
    Posted 3 years ago #

    Thanks guys ,

    I have the 4 variables ok for the wp-config.php file ok and have been playing round with combinations of the host file , recreating databases , users etc all to no avail.

    So I tried the testmysql.php free code I got from the following link

    http://www.webune.com/forums/testing-mysql-database-connection-script.html

    That didnt work which proves beyond doubt in my mind its a hosting issue

    the error I get is ;

    Notice: Undefined index: step in C:\Domains\mydomain.com\wwwroot\testmysql.php on line 8

    When I try the same file on any other wordpress installation with the 4 variables that go into a wp-config file it test them all fine with a Congratulations message at the end .

    Index.php and all the install files are sitting in wwwroot ready to rock ??

  13. Tara
    Member
    Posted 3 years ago #

    as I mentioned in my previous post (the last point):

    -Last, but not least, if all that information is correct, your database probably has a problem with it and you may need to contact your web hosting (unless you are your own server).

  14. lovefishing
    Member
    Posted 3 years ago #

    Just ran the test anyway using the IP number I got from pinging the mysql db host given by the hosting guys and got the following

    Test MySQL step 2

    Can't connect to MySQL server on 'mysql01.welcometothenetwork.com' (10060)

    I think if it passes the test results provided by testmyphp.php it will work no problem with the right 4 variables

    http://www.mydomain.com/testmysql.php

  15. lovefishing
    Member
    Posted 3 years ago #

    thanks t-p !

    You are correct, that is were the problem is but the hosting guys are saying everything is ok at their side but it clearly isnt

  16. datasoftict
    Member
    Posted 3 years ago #

    Notice: Undefined index: step in C:\Domains\mydomain.com\wwwroot\testmysql.php on line 8

    Be careful with the hosting if you are using the anbove as an example of the error. The message is a notice = not an error. It means that in the test php file someone didn't decalre a variable before using it.

    As you have access to the database via phpmyadmin what are the settings for the users? can you create a database using the login details that match your wp-config settings?

    If your hosting co is saying there is no problem then I would ask them to login using the test script you mentioned and let you have the details of the settings they used to make the script run.

  17. lovefishing
    Member
    Posted 3 years ago #

    thank datasoftict ,

    Ive asked them to run that script themselves , create a user with full privilages and fter t-p's post above to check their firewall settings and port 3306 ! they use 3308. They say they have passed it to the server engineer and I'll keep youse posted if .

    Thanks alot guys and we'll see how it pans out

Topic Closed

This topic has been closed to new replies.

About this Topic