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....
You just don't have a valid connection string to the database. Talk to your hosting provider and ask them what to use.
Hello, Did you change your old hosting to your new hosting in the config file (where you are getting the conextion) ? Jakomo
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.
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
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..