0

Preface:

I am a UX designer but often do need to accomplish setting up local sites. It is not uncommon for me to face issues, so I recently switched to MAMP Pro to hopefully make life easier for me.

I installed two Drupal 7 sites to work on and both are running.

The problem:

I then create a third Drupal 7 site and receive MySQL errors which I believe revolve around the user not getting access to the database. e.g. PDOException: SQLSTATE[HY000] [2002] Connection refused in lock_may_be_available().

Depending on how I configure the port, users, etc., I get some varying errors in mysql_error.log:

  1. Access denied for user '_spotlight'@'localhost' (using password: NO)
  2. Access denied for user 'MYCOMPUTERACCOUNTNAME'@'localhost' (using password: NO)

I've read countless answers and tutorials, the problem there is the barrier to entry in understanding the context of those answers, which inevitably leave me with the choice of just executing commands (scary).

Even though sometimes these answers help, most often they are ambiguous for my knowledge of MySQL application and usage (context).

Question:

Considering Drupal (or any CMS) is configured correctly, e.g. sites.php, settings.php, the database exists, etc., why would this site have user/connection errors and the others not?

Assumption:

I would almost assume that MAMP Pro gives the root user access to all hosts, and as long as my settings.php has the correct configuration, the site should load with the database.

Happy to provide any errors/config that might be needed.

Edit:

What may distinguish this question:

  1. I have no anonymous users in phpMyAdmin. Only root@ 'localhost', '::1', and '127.0.0.1'.
  2. I am only using MAMP Pro GUI to create hosts and databases.
  3. I have never edited any config files so am assuming I shouldn't have to run any commands/edits to make one Drupal 7 site work where another Drupal 7 site has no issues. Both using the same code base.
Prestosaurus
  • 195
  • 1
  • 9
  • Possible duplicate of [MySQL ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)](https://stackoverflow.com/questions/10299148/mysql-error-1045-28000-access-denied-for-user-billlocalhost-using-passw) – Ken White Jul 03 '19 at 17:50
  • Thank you for the link, I have not seen that question and there is a lot of information. First thought: I am trying to understand why one site would not work while others will, while using an application like MAMP Pro (users/access I think is generated by the program). Not necessarily how to get `'bill'@'localhost'` to work (unless that is the answer). I will review! – Prestosaurus Jul 03 '19 at 18:08
  • I believe I found a fix from this answer: https://drupal.stackexchange.com/questions/114656/pdoexception-when-creating-the-table-base-table-or-view-not-found/114671#114671. Changing the database tables engine from `InnoDB` to `MyISAM`. – Prestosaurus Jul 04 '19 at 17:41

0 Answers0