Need Help: Issue with Database on Mac with Bedrock/Sage setup

I’m encountering an issue with setting up my database on my Mac. Every time I try to complete the setup, I receive the following error messages:

  • “One or more database tables are unavailable. The database may need to be repaired”
  • “Error establishing a database connection”

Interestingly, when I attempted the setup on a Windows system using WSL, it worked without any problems.

While trying to debug further, I encountered the following error while attempting to repair the tables in phpMyAdmin:

Deprecation Notice in ./vendor/webmozart/assert/src/Assert.php#1973
Use of “static” in callables is deprecated

Backtrace

Mixin.php#81: Webmozart\Assert\Assert::__callStatic(
string ‘allStringNotEmpty’,
array,
)
RepairController.php#51: Webmozart\Assert\Assert::allStringNotEmpty(array)
Routing.php#192: PhpMyAdmin\Controllers\Table\Maintenance\RepairController->__invoke(
,
array,
)
index.php#44: PhpMyAdmin\Routing::callControllerForRoute(
,
string ‘/table/maintenance/repair’,
,
,
)

I’m seeking suggestions on how to resolve this issue without having to alter the vendor folder . Any help or insights would be greatly appreciated. Thank you.

I tried a solution from Reddit

Try Upgrading phpMyAdmin or downgrading your php version. Also depending on your setup you may need to change your database host ip in wp-config from 127.0.0.1 to localhost or vice-versa.

That helped clearing that deprecation notice, however the issue with WordPress connection to the database still remains.

DATABASE_URL=‘mysql://root:root@localhost:8889/wordpress’

  • “One or more database tables are unavailable. The database may need to be repaired”
  • “Error establishing a database connection”

No helpful debug info even with define( 'WP_DEBUG', true );

Since Bedrock and Sage don’t set up PHP, MySQL, etc. this seems to really depend on how you have your environment set up. Have you looked at what’s in the database? What versions of PHP and MySQL are being used?

How are you installing MySQL/MariaDB? I suggest checking out https://dbngin.com/

Check out https://sequel-ace.com/

Do you have dependencies that were installed on a different version of PHP? There seems like a good bit of conflict/issues going on with your dev environment.

https://herd.laravel.com/ might be worth checking out for managing nginx/PHP on top of my suggestions above.