Domain for Wordpress Database Repair using localhost - php

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.

Related

Wordpress: Error connecting to database again and again

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.

This site can’t be reached localhost refused to connect

I am getting a very strange error which I have no idea what is going on or how to fix. The strange thing is that I can connect to the /admin on my wordpress site. As soon as I try and view the site it crashes and I get this message - Any Ideas?
I have just downloaded a new copy of wordpress from the website. I go into php my admin create a database and username and password and matching what it is in wp-config file.
I then expect to login to localhost 8887 but as as soon as I hit that route I get to that site the port number disappears and I get this error message.
I have been experimenting with ssh tunneling this week so worried I have may have messed up some config but not really sure where to begin ? I dont think it is a wordpress problem more a networking problem?
In the picture localhost is written with double L-s. Isn't that the problem?
http:// locallhost..

Wordpress Error Establishing Database Connection

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.

Roundcube Plugins brick install

Hello all I am running Roundcube 1.0.2RC and I am having issues with plugins. I edited the config.inc.php file with the following:
$rcmail_config['plugins'] = array(
'cpanellogin',
'cpanellogout',
'markasjunk',
'userinfo',
'vcard_attachments',
'jqueryui',
'database_attachments',
'autologon',
'rccalendar',
'serverinfo');
and it causes round cube to no longer load. I have tried one at a time, I have tried using only one of each by commenting out. Nothing works. If I use one the whole thing stops working. The ones that are most important are the cPanel ones. When a user logs in though webmail on cPanel they have to login again to round cube. Any ideas?
So the issue was simple. It was character encoding on TextEdit for my Mac that caused the issue. The above posted code was edited and is now correct and working.

Multiple mysqli connection problems

I am having some strange issues with mysqli connections.
I was working on a page with mysqli, and it has been working fine all day. I then made a copy of this page, and stripped it down to debug a problem, and tested it as a different file. It worked fine connection wise. Upon trying to request the original file I was working on, I get the error:
Access denied for user 'user'#'localhost' (using password: YES)
I don't understand why. I have closed the connections after I have finished using them each time, although I don't see why that would be an issue. Interestingly, an older version of the file works fine, despite containing the exact same connection details and code.
What is going on?
Turn the question around. Rather than saying the two versions (the one that works and the one that doesn't) are identical in the aspects that matter, focus on the ways in which they are different and try to isolate which difference(s) also matter.
Make an additional copy of the working version. Verify that it works. Try making it into a copy of the non-working version by applying as many of the changes as you can, one by one, to this test copy, until you have something that is as close as possible to the broken version but that still works. Compare these two, and that should show you where the problem is.
Weird. If you are testing files from the same machine they should be working (if they have same code).
Check again username & password, i.e. spaces or strange chars.
Just for the sake of it, run a diff between the working copy and older version of the file. Check for any issues like: moved brackets, variable name changes, etc. Maybe the part of the code that defines the username and password never gets run!
If you need a free program for that, check WinDiff
If you put:
error_reporting(E_ALL);
as the first line in your code do you get any errors on either page? There may be something strange like the program can't open an include file anymore.
You said copying File A to File B means File A doesn't work. What happens if you copy File A to File B, delete File A then copy File B to File A?
Ensure that your IP is added to the MySQL allowed connections list, also ensure your password is correct. Try providing a full hostname rather than localhost if possible.
Post your code if un-successful.

Categories