Jump to content

Link to database cannot be established.


Recommended Posts

Hi im getting this message whenever i try to log in or try to look at my site. I went thorough my local host to change the password on the MySQL link but it still doesnt show. Its been a couple of weeks and i am stressing i wont be able to open it ever. A comp designer prepared the site for me and i cant get in contact with him at all. I have tired the original password and i still cant open my site: www.sissta.com.au/presta . ANY help will be very much appreciated!! Thanks in advance

Link to comment
Share on other sites

Hi
Yes exactly I got the same problem with my PrestaShop website.
I changed my password and then my website gone...

Well, I fixed the problem. Just do the following steps:

1- Go to your FTP connection where you uploaded all your files
2- Open Config folder in prestoshop
3- copy setting.inc.php to your system from your hosting
4- Open the file with Notepad or dreamweaver or any other application to see contents.
5- Try to find define('_DB_PASSWD_', ' Your password '); line in coding
6- type your new password there and then save it and upload the file in the same location that you already download it into config folder.. When you upload so, the system ask to rewrite the file and say yes

Note: Password is case sensitive...

Done... You have to be able to see your site again :)

Have a good one

  • Like 2
Link to comment
Share on other sites

Hi thank you but i really couldnt do it...i have been trying since u posted that message but i cant seem to know how to fix it. Alirm, can i private message you and you do it for more? I would be really greatly appreciative to you.

Link to comment
Share on other sites

Sure you can send PM but it really easy to do the steps that I mentioned in my previous post.
Any way, If you really don't have any idea how to solve the problem then you can send PM.

Link to comment
Share on other sites

I get same error from time to time & today also that uses a lot of resources.
I have changed nothing that I should change or restore passwords.
Can anybody help?
It seems this is one of the most problems Prestashop owners have but nobody even the programmers can solve it?

Link to comment
Share on other sites

If it's intermittent, it's obviously a problem with your webhosting environment... so talk to your provider.
On a shared hosting server, too many simultaneous connections to the (shared) mysql, yeah, not surprising to see "link to database cannot be established"

Well, then the question is if this is the reason, why this problemdoes not happen with my other websites in the same shared hosting server? It is only with my first website that has more traffic than others while my first website has less than 100 visitors every day.

Link to comment
Share on other sites

I have the same problem when I upgraded from ver. 1.4.0.17 to 1.4.1, I think is a very common problem and it might have several causes, so it would be very useful to have a guide on what to check or a list of possible causes. In my case I think is a configuration problem, I know the db user and the passwords are ok, but I do not know what else I should check. Any help is welcome.

Link to comment
Share on other sites

Sure you can send PM but it really easy to do the steps that I mentioned in my previous post.
Any way, If you really don't have any idea how to solve the problem then you can send PM.


Not knowing the difference between an ftp connection to a password link, or anything in between, Alirm fixed it for me....i am ever so grateful to a person halfway across the world who helped a stranger...and from what he has told me, he used the same steps he did to get his site back on track, and now my site is back in full swing :)
Link to comment
Share on other sites

Well, I think you need Just do the following steps:

1- Go to your FTP connection where you uploaded all your files
2- Open Config folder in prestoshop
3- copy setting.inc.php to your system from your hosting
4- Open the file with Notepad or dreamweaver or any other application to see contents.
5- Try to find define(’DB_PASSWD‘, ‘ Your password ‘); line in coding
6- type your new password there and then save it and upload the file in the same location that you already download it into config folder.. When you upload so, the system ask to rewrite the file and say yes

Note: Password is case sensitive…
Note: before changing your password in setting.inc.php make sure that you already changed your database password(Choose something new- wait to be confirm with your hosting-Not pending if you use Go Daddy hosting...The database password has to match with the password that you import into your setting.inc.ph

This is a only solution if you got (Link to database cannot be established.) message.
If doesn't work check all steps again to make sure you are doing right.

If this solution doesn't worked for you then you probably changed something that you don't know in your database like your database name or etc..
or your hosting changed ((((define('_DB_SERVER_',?))))))))) route so, you can call them to make sure that they didn't upgrade or changed their setting from source!!!!
Have a good one

Link to comment
Share on other sites

I did exactly as you suggested & used a long number as password to avoid mistakes in the case sensetive matter but the problem was not solved.



If this solution doesn’t worked for you then you probably changed something that you don’t know in your database like your database name or etc..
or your hosting changed ((((define(’DB_SERVER‘,?))))))))) route so, you can call them to make sure that they didn’t upgrade or changed their setting from source!!!!
Link to comment
Share on other sites

Check all these parameters in your file and make sure that you entered all these information right!!!! I am sure that one of these fields can not match into your system.

<?php

define('__PS_BASE_URI__', '/');
define('_MEDIA_SERVER_1_', '');
define('_MEDIA_SERVER_2_', '');
define('_MEDIA_SERVER_3_', '');
define('_PS_CACHING_SYSTEM_', 'MCached');
define('_PS_CACHE_ENABLED_', '0');
define('_THEME_NAME_', 'YOUR THEME NAME');
define('_DB_NAME_', 'YOUR DATABASE NAME');
define('_MYSQL_ENGINE_', 'InnoDB');
define('_DB_SERVER_', 'YOUR HOSTING &SERVER;ID');
define('_DB_USER_', 'YOUR DATABASE USERNAME');
define('_DB_PREFIX_', 'ps_');
define('_DB_PASSWD_', 'PASSWORD HERE');
define('_DB_TYPE_', 'MySQL');
define('_COOKIE_KEY_', 'COOKIE KEY HERE');
define('_COOKIE_IV_', '3XsihgWt');
define('_RIJNDAEL_KEY_', '******');
define('_RIJNDAEL_IV_', '*****');
define('_PS_VERSION_', '1.4.1.0');

?>

Link to comment
Share on other sites

I have the following in Version 1.3.2.3 & nothing wrong:

<?php

define('__PS_BASE_URI__', '/');
define('_THEME_NAME_', 'prestashop');
define('_DB_NAME_', 'Correct');
define('_DB_SERVER_', 'localhost');
define('_DB_USER_', 'Correct');
define('_DB_PREFIX_', 'ps_');
define('_DB_PASSWD_', 'Correct');
define('_DB_TYPE_', 'MySQL');
define('_COOKIE_KEY_', 'NO CHANGE');
define('_COOKIE_IV_', 'NO CHANGE');
define('_PS_VERSION_', '1.3.2.3');

?>

Link to comment
Share on other sites

I did not changed anything else.
I just know this problem happens for weeks from time to time & then it is solved & again after some weeks the same problem starts.



If you really didn't changed anything so, It could be from you hosting...
I think it is better to call them and ask them there are some bugs in their hosting service or not...

Because if your Prestashop got any problem so, you can not connect until you make it correct. But as you said sometimes you got this message and some other times your website work right then the only problem is your hosting. It seems when hosting (server) has problem then your information can not collecting from your setting.inc.php and when the connection back then you has your website again!!!!
Link to comment
Share on other sites

My web host company does not want to accept it is their fault & their answer:

Its seems that the problem was caused because of a resource over usage. We have
change your account resource limit to be more permissive.

Your website regularly exceeds the maximum amount of resources (CPU or RAM)
that is allocated to shared hosting plans. We wish to remind you that the
maximum limit of resources usage on a shared server is 2% in order to avoid any
negative impact on other customers that are hosted on the same server. Your
website seems to be very successful but the amount of traffic that it generates
does not allow to host it in a satisfactory manner in a shared environment. We
strongly suggest that you consider migrating your website towards a dedicated
server that will give you better performances.

Our sales team is available to give you more information on our dedicated
servers at 1-888-909-iWEB (4932).

Link to comment
Share on other sites

As long as you are using shared hosting so, you can not do anything about it...
I think if they can not take responsibilities or solve your problem then you can change your hosting provider.
I am using Go Daddy and I don't have any problem with them and there are no limitation to use in their server.
Also, you can check 1&1;hosting provider!!!
Because as you explained in your previous post then I think the problem is not your prestashop and you need to think about changing your hosting.

Good Luck

Link to comment
Share on other sites

  • 2 months later...

here are some more steps that may help.

1-Go to your FTP connection where you uploaded all your files
2- Open Config folder in prestoshop
3- copy setting.inc.php to your system from your hosting
4- Open the file with Notepad or dreamweaver or any other application to see contents.
5- Try to find define(’DB_PASSWD‘, ‘ Your password ‘); line in coding
6- type your new password there and then save it and upload the file in the same location that you already
download it into config folder.. When you upload so, the system ask to rewrite the file and say yes

7- Now go to your Hosting control panel. You need to access your SQL database.
8- In the SQL database, there will an option to change your password for your web database.
9-Click on change password..change the password to the same password that is in DB_passwd (setting.inc.php)[/color]


This worked for me. I hope this helps

Link to comment
Share on other sites

  • 1 month later...

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