Problem with importing database

Discussion in 'MySQL' started by dartdesign, Sep 6, 2007.

  1. #1
    Hello,

    I recently transfer a website to different webhost, but after importing database i have problems with proper working of website.

    I receive error messages:


    Warning: mysql_connect(): Access denied for user '******'@'localhost' (using password: YES) in /var/www/html/db.php on line 2

    Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/html/db.php on line 3

    Warning: mysql_query(): Access denied for user '*****'@'localhost' (using password: NO) in /var/www/html/index.php on line 35

    Warning: mysql_query(): A link to the server could not be established in /var/www/html/index.php on line 35

    Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/index.php on line 37


    Is it possible a prefix of database to be the problem ? And how i can fix it ?

    King regards....
     
    dartdesign, Sep 6, 2007 IP
  2. ssanders82

    ssanders82 Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You just don't have a valid connection string to the database. Talk to your hosting provider and ask them what to use.
     
    ssanders82, Sep 6, 2007 IP
  3. jakomo

    jakomo Well-Known Member

    Messages:
    4,262
    Likes Received:
    82
    Best Answers:
    0
    Trophy Points:
    138
    #3
    Hello,
    Did you change your old hosting to your new hosting in the config file (where you are getting the conextion) ?

    Jakomo
     
    jakomo, Sep 6, 2007 IP
  4. dartdesign

    dartdesign Well-Known Member

    Messages:
    336
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #4
    Thanks for replies. I think i need to take a look once again. Yes problem comming from relocating website. I also had problem with phpld server path, but Hosting provide fix it. I will contact them again.
     
    dartdesign, Sep 7, 2007 IP
  5. Zippo

    Zippo Peon

    Messages:
    311
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Isnt a big problem:

    go into /include/config.php

    and edit your new configuration

    define ('DEMO', false);
    define('LANGUAGE', 'en');
    define('DB_DRIVER', 'mysql');
    define('DB_HOST', 'localhost');
    define('DB_NAME', 'newdatabasename');
    define('DB_USER', 'newuser');
    define('DB_PASSWORD', 'newpassword');

    GL
     
    Zippo, Sep 9, 2007 IP
  6. fabriciogr

    fabriciogr Active Member

    Messages:
    958
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    73
    #6
    hey.. like mentioned before.. you're trying to connect to the database here

    /var/www/html/db.php on line 2

    and your settings are not set correctly...

    could be username, pass or maybe even database name..

    do you use CPANEL? if so you can compare the values you have in your settings with CPANEL and be able to pinpoint the error...

    if u need anymore help be glad to do so..
     
    fabriciogr, Sep 9, 2007 IP