• lovefishing

    (@lovefishing)


    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 ;

    https://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

Viewing 15 replies - 1 through 15 (of 16 total)
  • 2ells

    (@2ells)

    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?

    Thread Starter lovefishing

    (@lovefishing)

    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.

    2ells

    (@2ells)

    When you say you ran https://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?

    maoski

    (@maoski)

    did you try

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

    Thread Starter lovefishing

    (@lovefishing)

    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

    Thread Starter lovefishing

    (@lovefishing)

    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

    datasoftict

    (@datasoftict)

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

    Thread Starter lovefishing

    (@lovefishing)

    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.

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

    datasoftict

    (@datasoftict)

    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?

    Moderator t-p

    (@t-p)

    -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: https://www.ads-software.com/search/Error+establishing+a+database+connection?forums=1

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

    Thread Starter lovefishing

    (@lovefishing)

    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

    https://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 ??

    Moderator t-p

    (@t-p)

    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).

    Thread Starter lovefishing

    (@lovefishing)

    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

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

    Thread Starter lovefishing

    (@lovefishing)

    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

    datasoftict

    (@datasoftict)

    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.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Install and connect to database problem’ is closed to new replies.