Forums

Error in database connection (10 posts)

  1. mpxzon
    Member
    Posted 3 years ago #

    Error in database connection

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/mpcb/public_html/Myblog/wp-config.php on line 4

    How do I correct this error?

    Thank u

    MPaul

  2. randinicole
    Member
    Posted 3 years ago #

    to quote michael from a previous topic

    Probably some edit error with wp-config.php.

    Start over with the wp-config-sample.php and copy/rename that to wp-config.php and re-edit.

    BTW, search is your friend

  3. J.D.
    Member
    Posted 3 years ago #

    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 10.3.57.46. 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 need to know what's going on with this issue I really have to get this site back up and running please help me A.S.A.p

    southbos6@yahoo.com

  4. Samuel B
    moderator
    Posted 3 years ago #

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

    That's fairly clear.

  5. arungupta
    Member
    Posted 3 years ago #

    I unzipped wordpress.zip (2.7.1) in the root directory, started MySQL 5.1.30, tried installing WordPress and got the same error as mentioned above. Everything is running on the localhost and tried specifying the host as "localhost" and "127.0.0.1", with/without port # but keep getting the same error. Also tried with the default root user/no password and create user/password.

    Any help will be appreciated ?

  6. sanjit
    Member
    Posted 3 years ago #

    Well just install the wordpress again.change the wp-config-sample.php to wp-config.php.Set up the database connection.open your database & copy the database name as well as you can see there a DB host.what ever IP will be written,just copy & paste it in your wp-config.php file as well as give the username & password.nothing more to be changed there.

  7. arungupta
    Member
    Posted 3 years ago #

    Here is how wp-config.php looks like:

    -- cut here --
    // ** 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', 'root');

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

    /** MySQL hostname */
    define('DB_HOST', '129.145.132.225');
    -- cut here --

    I tried specifying :3306 in DB_HOST but still no luck.

    Also tried specifying a username/password that has access to "wordpress" database, still the same error.

    What could be missing ?

  8. figaro
    Member
    Posted 3 years ago #

    Maybe this will help.

    http://educhalk.org/blog/?p=148

  9. sanjit
    Member
    Posted 3 years ago #

    Well Arun, if you dont mind then can I see your blog ? contact me here at sanjit.ghosh12@yahoo.co.in

  10. arungupta
    Member
    Posted 3 years ago #

    figaro, the video was really helpful and explain the potential causes. But I believe the setup on my machine is simple and correct but still getting the same error.

    The specified DB_USER has GRANT ALL PRIVILEGES on *.* and MySQL is hosted on localhost.

    sanjit, I'm trying everything on my local machine so the blog is not viewable publicly.

    Any clues, before I finally give up ?

Topic Closed

This topic has been closed to new replies.

About this Topic