Wordpress: Error reconnecting to the database
I am getting the error again and again that I am now tired. I am getting this error at least 2 times a minute or so during reload.
What I tried
Give custom value to pdo_mysql.default_socket and mysqli.default_socket
Took value from info.php file.
Changed localhost in wp-config to 127.0.0.1
Reloading Apache2 and Mysql.. many times
It does connect with the database after some wait so... credentials are ok and I have also checked them personally.
Solutions pls? IT is consuming my a lot of time.. which makes me sad :(
There is numerous problems that can lead to that issue.
Your issue is not permanent, so it looks like network issue or mysql side related problem.
Try to repair database, using STEP 3 from this tutorial
Add that line to wp-config.php
define('WP_ALLOW_REPAIR', true);
Then go to http://www.yousite.com/wp-admin/maint/repair.php and follow dialog instructions as tutorial says.
Related
I recently started experiencing a strange error every single time I try to visit the transplant a module page. From the design > positions page3 I click on the "transplant a module" button on the top right and it takes a really long time to load, but then it does not load at all. I get a blank page with the following error:
The page you are looking for is temporarily unavailable.
Please try again later.
5cb0af3eb5bd6096ecb4dce014d6635a 3a1c22abc23c754c0fb7be3b7c58431e 159cf03490b9d26b556696ed897a7daa
I contacted my server provider and they explained to me that the server I was using was reaching the max amount of files allocated, and that I needed to get a new server just for this particular site. So I did. I then cloned the site and database and brought it over to the new server....but I'm still getting this error everytime I try to transplant a module.
Any one ever encountered this issue? Any one have any ideas as to what could be causing this? Any suggestions on what I can do to troubleshoot this error further?
I have turned on debug mode, and it does not give any more information than what's above.
Thank you all,
Maybe you are facing the following known bug. It will be fixed in 1.7.5 (coming soon)
https://github.com/PrestaShop/PrestaShop/issues/10811
Sometimes module have some issues, I've a problem one day and this help me :
In config/xml copy the 2 files "must_have_modules_list.xml" and "default_country_modules_list.xml" on your PC in case,
And then delete the two files from your site,
This "refresh" the cache of your module config
Hope will help you
The "Transplant a module" page is now working after I changed the file AdminModulesPositionsController.php in /root/controllers/admin folder.
In line 449 changed:
$all_modules_controllers = Dispatcher::getModuleControllers($type);
to
$all_modules_controllers = Dispatcher::getControllers($type);
Try this, it's working for me.
I have been playing around with wordpress recently and encountered my first
“Error establishing Database Connection”. I have done some research and postet this snippet into my wp-config.php file (right above 'That's all, stop editing ...):
define('WP_ALLOW_REPAIR', true);
Now I need to go to http://your-site.com/wp-admin/maint/repair.php in order to actually repair the database. But I'm running everything just locally.
My question therefore: with wich 'domain' do i replace "your-site" when just using a local host?
Thanks already a lot!
Alex
Try
localhost/wp-admin/maint/repair.php
But it depends on how your localhost is set up.
I have reinstalled phpAdmin (due to another issue) and updated wp-config with the correct names for DB, user name, password, etc, but now I cannot access the wordpress site (www.enablie.co.uk, www.enablie.co.uk/wp-admin or http://www.enablie.com/phpmyadmin).
I have tried adding the repair code
define('WP_ALLOW_REPAIR', true);
But still cannot access via : http://www.enablie.co.uk/wp-admin/maint/repair.php.
I am also getting this error when trying to access sql -
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
On Chrome is is showing a basic version of the site (broken styles) when not logged in, but get the EEDC as soon as try to log in. On Safari I have the EEDC immediately.
I assume I have just done something stupid, but most errors seem to suggest naming errors in the config file which I know is not the case. I have also checked the db still exists via mysql to ensure that there is not a problem there.
I assume that the re-install removed something from the overall settings that I now need to manually reconfigure, but I can't find any guidance that points me where to look so would appreciate some help on what I need to change. Much appreciated!
I rebooted by instance and that seemed to fix the issue.
I changed my DNS to my new server on iPage. My previous server was AWS and now I got this error message:
I used to access to my site from here http://matchmakinginstitute.ipage.com/ but now is not working either.
So both links:
http://matchmakinginstitute.ipage.com/
http://matchmakinginstitute.com/
Are showing me the same error. I checked my error log file and I have only 1 line:
1479164063:
/hermes/bosnaweb03a/b2364/ipg.matchmakinginstitute/ssv3_payload_extractor-aU0H89Pshc.php
startup
Does somebody know what else can I do to fix this issue?
Thanks
Keep in mind DNS changes can take up to 48 hours to take effect.
If it's still not working after 48 hours i would suggest reverting the DNS changes and try again.
https://godaddy.com/help/what-factors-affect-dns-propagation-time-1746
Your page seems to be working fine now, did waiting do the trick ?
I'm trying to get a wordpress local install working on my Mac.
I've recently set up a database, username and password using the MySQL client as per the instructions in the wordpress codex. That part is ok.
When I go to the local site on my computer I'm prompted by wordpress to set up the wp-config.php file. Putting in the same details that definitely work with the MySQL client returns an error.
Manually updating these details in the 'wp-config-sample.php' file and renaming it as 'wp-config.php' also doesn't work - I'm now greeted with a big bold message: "Error establishing a database connection".
From what I can gather, php and mysql are not communicating with each other properly.
I've changed the apache 2 configuration file found in 'etc/apache2/httpd.conf' and uncommented the line which loads the php5 module: LoadModule php5_module libexec/apache2/libphp5.so
and restarted the apache server. This has still not fixed my problem. I'm stuck on what to do next... help appreciated please!
It's been fixed now.
php was looking in the wrong place for the mysql.sock file, and couldn't communicate with the mysql database, meaning wordpress couldn't be set up.
On the command line I typed
ps aux | grep mysql
to bring up as much info about mysql that I could. From this I saw that the mysql socket on my computer is being used at /tmp/mysql.sock
Meanwhile, in the "wp-config.php" file, I changed the line define('WP_DEBUG', false); to define('WP_DEBUG', true); and refreshed my web browser that was showing my localhost setup. This now said a lot more info than "Error establishing a database connection" - infact I could see that the mysql.sock was not configured correctly at all.
Creating a 'phpinfo.php' file with just the single line of code <?php phpinfo(); ?> was the pivotal turning point for me.
Putting that 'phpinfo.php' file in my localhost directory and then viewing it from my web browser not only definitely confirmed that the mysql.sock file was not configured properly, but it also showed where the configurations were being loaded from on my machine: '/private/etc/php.ini'
The next thing I did was open up the 'php.ini' file in a text editor and doing a quick find and replace to update the correct location of mysql.sock.
Finally, a restart of the local apache server needed to be done to fully update all the new settings that I'd been fiddling about with.
sudo apachectl restart
Now everything works fine!
The Error-Message "Error establishing a database connection" indicates clearly, that the php-script can not establish the connection. This can have one of the following reasons:
Your host in the wp-config.php is not correct.
The mysql-server does not listen on that host
The user you set up in the mysql has no privileges to connect the way you are trying
The firewall blocks the access of the php-script to your mysql-host
Try to connect the database with the same settings of your wordpress using Sequel Pro (or any other GUI to connect a mysql database). If the connection works, the problem 2. and 3. isn't your problem.
Look in your firewall-log to make sure 4. is also not your problem.
If all problems are excluded (even 1. after a final check), try to run something like phpMyAdmin to connect your database, to make sure your php-installation has the needed drivers.