Jump to content

link to database cannot be established ----------- please help!!


Recommended Posts

I am a new user and am in a great need of some help to link the database in my hosting server. basically i have used wamp to configure prestashop and i have created a database with a name only and no password. i have configured the settings.inc.php and it looks like this

<?php
define('_DB_SERVER_', 'localhost');
define('_DB_TYPE_', 'MySQL');
define('_DB_NAME_', 'prest');
define('_DB_USER_', 'root');
define('_DB_PASSWD_', '');
define('_DB_PREFIX_', '');
define('__PS_BASE_URI__', '/prest/');
define('_THEME_NAME_', 'prestashop');
define('_COOKIE_KEY_', 'q9fqE7JhDXVMJ3b99eXgNvh3MoUfpDk13FHbbyCtXHmqRNTS4LviK0pk');
define('_COOKIE_IV_', 'Jx0ycnNN');
define('_PS_CREATION_DATE_', '2008-11-29');
define('_PS_VERSION_', '1.1.0.3');
?>
i have changed it to this.

<?php
define('_DB_SERVER_', 'localhost');
define('_DB_TYPE_', 'MySQL');
define('_DB_NAME_', 'prestashop');
define('_DB_USER_', 'printinn');
define('_DB_PASSWD_', 'anypassword');
define('_DB_PREFIX_', '');
define('__PS_BASE_URI__', '//');
define('_THEME_NAME_', 'prestashop');
define('_COOKIE_KEY_', 'q9fqE7JhDXVMJ3b99eXgNvh3MoUfpDk13FHbbyCtXHmqRNTS4LviK0pk');
define('_COOKIE_IV_', 'Jx0ycnNN');
define('_PS_CREATION_DATE_', '2008-11-29');
define('_PS_VERSION_', '1.1.0.3');





still it doesn't work and body help please>?
?>

Link to comment
Share on other sites

define(’PS_BASE_URI‘, ‘//’); should be define(’PS_BASE_URI‘, ‘/’); IMO.

Do you try and get connected to the database running php local on your pc, and have it connected to your online db?

If so change define(’DB_SERVER‘, ‘localhost’); to define(’DB_SERVER‘, ‘DB_SERVER_IP’); if your server supports accessing the DB from outside.

MArco

Link to comment
Share on other sites

Hi thanks for a speedy reply

basically, i have used wamp to create the shop with the database. then i rented the hosting. and i downloaded the files from www folder of my wamp to public_html and then exported the database as mysql from my local computer to the server. there was a prefix added to my database name it was "prestashop" my computer and then it changed to printinn_prestashop. it doesn't have any password originally.

http://92.52.122.135/~printinn/

hope you can figure it out.

james

Link to comment
Share on other sites

can you login to mysqladmin on your host? It should match the config file.

is your database password "anypassword" ? as in: define(’DB_PASSWD‘, ‘anypassword’); if on the server the DB has a password, it should come back in the config files.

Marco

Link to comment
Share on other sites

hi

when i was working on wamp there was no password on the database, i have tried it with/without that "anypassword".


but i have used my cpanel password and it is given me this message > Invalid loadConfiguration() SQL query! <

i dont know what that means.

james

Link to comment
Share on other sites

  • 1 month later...

I'm also having the same problem. I'm pretty new to this so I'm not sure where I went wrong. Is there a particular post with instruction on how to migrate from a site that was tested on wamp to a real hosting?

Here is what I did.

I develop my site locally on wamp and now I want to move everything to my hosting provider. So I copied all my prestashop file from my localhost to the web hosting and now all I see when I try to access my site is "Invalid loadConfiguration() SQL query!".

Anybody have any idea? What I should look at?

Any help is greatly appreciated.

Thanks

Link to comment
Share on other sites

  • 3 weeks later...
I'm also having the same problem. I'm pretty new to this so I'm not sure where I went wrong. Is there a particular post with instruction on how to migrate from a site that was tested on wamp to a real hosting?

Here is what I did.

I develop my site locally on wamp and now I want to move everything to my hosting provider. So I copied all my prestashop file from my localhost to the web hosting and now all I see when I try to access my site is "Invalid loadConfiguration() SQL query!".

Anybody have any idea? What I should look at?

Any help is greatly appreciated.

Thanks


I also maked it and I have the same results. Any ideas?
Link to comment
Share on other sites

Well, if I am you, I will simply do a fresh install with the correct db name and user passwd on your web hosting... Backup your local db and restore it onto your fresh installed website...

Link to comment
Share on other sites

  • 1 year later...

its same problem with me
I have figured setting.inc.php like this :


<?php

define('__PS_BASE_URI__', '/adminpres/');
define('_THEME_NAME_', 'prestashop');
define('_DB_NAME_', 'my databse');
define('_DB_SERVER_', 'mysql17.000webhost.com');
define('_DB_USER_', 'my username');
define('_DB_PREFIX_', 'a2633698_');
define('_DB_PASSWD_', 'mypassword');
define('_DB_TYPE_', 'MySQL');
define('_COOKIE_KEY_', '8CaeOvM21MThO0O2KNUtKw1x3hIuFzkI80Gn8vKswMnYh1kj6Ujqugv7');
define('_COOKIE_IV_', '6YVWqjaM');
define('_PS_VERSION_', '1.3.1.1');

?>

but respon still :Invalid loadConfiguration() SQL query!
pls help, thanks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...