Having trouble setting up localhost on mac

218 Views Asked by At

I'm trying to set up localhost on my Mac, which runs on Catalina.

I followed instructions here: https://websitebeaver.com/set-up-localhost-on-macos-high-sierra-apache-mysql-and-php-7-with-sslhttps

And got stuck here:

enter image description here

Instead, I'm seeing:

Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /Users/nana/Sites/index.php on line 2

Warning: mysqli::query(): Couldn't fetch mysqli in /Users/nana/Sites/index.php on line 3

Fatal error: Uncaught Error: Call to a member function fetch_object() on bool in /Users/nana/Sites/index.php:3 Stack trace: #0 {main} thrown in /Users/bkwon/Sites/index.php on line 3

Now, I realize that the article is for High Sierra, not Catalina. I wonder if that's why I'm seeing the error message? I'm not familiar with this at all, I just followed the instructions in the article while having no idea what I'm doing, so would be thankful if you could be a bit more specific in giving answers.

Note: I tried a new plain number (e.g. 12345) password for MySQL, but that didn't do anything

0

There are 0 best solutions below