WordPress error - plugin can't access database
Posted by: figi4 (66.115.145.---)
Date: February 08, 2021 09:54PM

1 - Windows 10 64 bit
2 - Version WampServer 3.2.3.3 64 bit
3 - Apache Version 2.4.46
4 - PHP Version 7.3.21
5 - MySQL Version 5.7.31
5a - MariaDB version if applicable N/A
6 - What color is the WampServer icon (in the notification area of the taskbar) GREEN
7 - In the file c:\Windows\System32\drivers\etc\hosts, what are the active lines?
* Active means no # at the beginning of the line.
127.0.0.1 localhost
::1 localhost
127.0.0.1 ourfamilyforest
::1 ourfamilyforest
127.0.0.1 ourfamilyforest.local
::1 ourfamilyforest.local

If the WampServer icon is green:

8 - Do you have access to localhost (Homepage WampServer)? yes
8a - If so, is there an error message at the bottom of the page? no

9 - Do you have access to phpMyAdmin? yes

10 - If you refer to an error message, please include the EXACT wording of the error in your post
Inside of WordPress I have a plugin called MailPoet. When loading WordPress I get an error at the top of the screen that states"
"MailPoet Error: Unable to connect to the database (the database is unable to open a file or folder), the connection is likely not configured correctly. Please read our Knowledge Base article for steps how to resolve it."

11 - If you use an Antivirus and / or Firewall, please include the names of these
Avast Premium Security for AV and Windows Firewall

12 - What is the full path to the installation of WampServer (eg D:\wamp\)
C:\wamp\

13 - If you have one or more Virtual Hosts defined, please show their definition(s)
localhost
ourfamilyforest.local

--------------------------------------------------------


My install of WampServer went smoothly. I chose PHP, Apache and MySQL, versions that matched the hosting provider that I use for my online site.
Migrating my site over had an error with action scheduler that I skipped over because I did not know how to fix it, and Googling did not help.

WordPress database error Table '3123167_wpress212a8966.wp_actionscheduler_actions' doesn't exist for query SELECT a.action_id FROM wp_actionscheduler_actions a WHERE 1=1 AND a.status='complete' AND a.last_attempt_gmt <= '2021-01-08 19:18:10' ORDER BY a.scheduled_date_gmt ASC LIMIT 0, 20 made by do_action_ref_array('action_scheduler_run_queue'), WP_Hook->do_action, WP_Hook->apply_filters, ActionScheduler_QueueRunner->run, ActionScheduler_Abstract_QueueRunner->run_cleanup, ActionScheduler_QueueCleaner->clean, ActionScheduler_QueueCleaner->delete_old_actions, ActionScheduler_DBStore->query_actions

There are quite a few of these, all concerning action scheduler. I could only find reference to that in connection with Woo Commerce which I do not use, so I thought it would be ok to ignore.

My only issue that I am having with my migration to local, is that when I load WordPress, although it loads fine, I have a warning message at the top that states:

"MailPoet Error: Unable to connect to the database (the database is unable to open a file or folder), the connection is likely not configured correctly. Please read our Knowledge Base article for steps how to resolve it."

Going to the article supplied, it gave me two options to correct the database connection.
To open wp-config.php and change the DB_HOST from localhost to 127.0.0.1, which I did with no changes. I restarted WampServer and refreshed WordPress, still the error remained.
Googling found a suggestion of adding '127.0.0.1:3306', that did not help either.

The second option, I am unfamiliar with but did my best in trying to do as instructed. What stopped me is that I cannot find 'mysql.sock' anywhere. I looked through the whole wamp directory and nada.

Im unsure how to proceed, wondering if mysql.sock is not a Wamp thing or maybe not a Windows or localhost thing?

Thank you!

Options: ReplyQuote
Re: WordPress error - plugin can't access database
Posted by: Otomatic (Moderator)
Date: February 09, 2021 09:04AM

Hi,

> My only issue that I am having with my migration to local, is that when I load WordPress,
Have you migrated WordPress to a VirtualHost?
Local sites must use VirtualHost, as with all hosting providers.
See
The need for Virtual Host
and
Wampserver 3 - Create or add a VirtualHost
and
Why to create a VirtualHost BEFORE installing a CMS

In addition, WordPress writes its base url in its database, so you have to go locally to modify the database to put the url of the local VirtualHost in it.

This is a WordPress problem.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 02/09/2021 10:24AM by Otomatic.

Options: ReplyQuote


Sorry, only registered users may post in this forum.