• Resolved bertstheword

    (@bertstheword)


    Let me first get something off my chest: I’m completely new to wordpress and hosting websites in general. I hope you will all be patient with me and I appreciate any help and/or suggestions.

    I’m trying to setup a website on an old Mac Mini running MacOS 10.14.4 (Mojave) which is on all the time anyway.

    I’ve googled at it for a couple of days and I’ve gotten this far:
    – I installed Homebrew and used that to get Nginx (I didn’t want to use apples build-in Apache-server as I figured with Nginx I migth give myself an easier time ind the future in case I switch hardware.)
    – Using Homebrew I also installed php@7.2 and MySql 8.0.16 Homebrew
    – I remapped Nginx’s config file to point to another disk where I want the website-files to be stored.
    – I setup my local DNS-server so my domain-name points to the Mac Mini
    – Downloaded and placed wordpress in the www-folder I pointed Nginx to.
    – Made a MySQL-user and a database using CLI and then confirmed, by using “TablePlus” SQL GUI, that the wordpress-user I created can authenticate and see the database. Using TablePlus I’m able to manually make entries into the database I made for wordpress with the wordpress user.

    Entering mydomainname.dk on the mac mini’s webbrowser I see the WordPress welcome-site.
    I chose English and then entered my MySQL database-name and credentials. But all I get is:
    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at 127.0.0.1. This could mean your host’s database server is down.
    • Are you sure you have the correct username and password?
    • Are you sure that you have typed the correct hostname?
    • Are you sure that the database server is running?
    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
    ————————————

    As for database-host I’ve tried 127.0.0.1:3306, localhost and a lot of variations hereof.
    The MySQL and WordPress is on the same physical machine, so as far as all the sites I’ve googled tell me, “localhost” should be enough.

    What am I missing here ? Any help is appreciated and if any info or tests are needed let me know. :o) Thanks a lot for reading.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Are you really dedicated to this setup? Because there are a lot of moving pieces here.

    If you want to play with WP on a Mac, I strongly recommend using Local By Flywheel. It sets up a containerized virtual system that lets you create WP sites with just one click. And it’s free. https://localbyflywheel.com/

    Thread Starter bertstheword

    (@bertstheword)

    Thanks for taking your time to reply, Steven. :o)

    I realise I’m in a bit over my head here ;o) but I’m ready to put some time and effort into getting this thing going and I’m willing to learn.

    While setting up the Mac Mini I did come across LocalByFlyWheel (and also MAMP which seems sort of similar) but as far as I see they both have some degree of a paywall and I’m not really sure they are for actually hosting a website, as it seems they are meant to be tools for local development and testing – whereafter the website would be uploaded to a “real” web-host. Is that correct?
    As I’m on a budget I would like the things to actually run on the Mini. I’m not counting on getting more visits than it can handle anyway.

    Thread Starter bertstheword

    (@bertstheword)

    So I had a bit of a look at MAMP and figured it does exactly the same as what I already installed with Homebrew, just in it’s own container. Only it uses MySQL 5.7 – I’m running version 8.

    That also ended up being the reason wordpress coudn’t connect to MySQL. MySQL 8 uses sha2 password validation, which WordPress doesn’t seem to support – hence it can’t connect to the database.
    There seems to be workarounds on the SQL-server-site of the setup, but I decided to rollback to MySQL 5.7 until I figure out how to get WordPress to support sha2 MySQL login.

    Followed this guide to Uninstall MySQL. Then installed mysql@5.7 with Homebrew.

    Everything is working great now! :o)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘First Time Installing WordPress on Mac’ is closed to new replies.