Category: Technology

Every post that has something got to do with technology…whether it’s to do with computers, phone, the internet. It’ll be posted here

  • Swap from SQLite to MySQL 8 for Ghost

    Swap from SQLite to MySQL 8 for Ghost

    Whenever Ghost released 5.0 back in May, they made a change so that Ghost no longer supports SQLite3 or MySQL 5.

    I didn’t mind running SQLite until the recent 5.9 changes on the Docker image for Ghost changed all of that. So now, if you try to run Ghost via SQLite3 on your Docker container, it will stop working.

    Obviously, if you still want your site to run, you would either need to continue to use a older version of Ghost (Eg. Anything <5.9) OR change to MySQL 8.

    Unfortunely, if you are running a modern day control panel like Plesk or cPanel, you may not be able to use MySQL 8 as it may have only been distrbuted with MariaDB. MariaDB is not supported on Ghost either. Solely Oracle’s MySQL 8.

    So if you already have MariaDB installed and you do not want to go through the hassle of going through the task of switching database engines and potentially causing issues for non-Ghost sites, then carry out the following:

    ⚠️
    🚨

    This will involve creating 2 Docker containers:

    • A new Ghost docker container
    • MySQL 8 Docker container.

    We’ll quicky go through the MySQL 8 Docker set up.

    • Volume Mapping should set to /var/lib/mysql and the 2nd box should be set to /var/docker/<container_name>/mysql

      • You can put this anywhere that you like, but I advise keeping it within the /var/ directory for ease of access.
    • Uncheck the ‘Automatic Port mapping’ and you will be presented with 2 ports.

      • Port 3306 would already be used by MariaDB so change this to another port. I chose 3307.
      • Port 33060 would also be used by MariaDB so change this to 33061

    Where it has Environment Variables, add the following:

    • MYSQL_ROOT_PASSWORD and in the 2nd box, add in your root password. This is caps sensitive, so ensure this is strong.

    🚨

    Now with the database server created, we will need to create the database, for this, you will need to drop into the shell for this container.

    In SSH, connect to your server and ensure that you are on root user.

    • Type docker exec -it <mysql_docker_container> /bin/bash/ eg: docker exec -it mysqleight_docker /bin/bash and press enter.
    • Type mysql -p and enter in your MYSQL_ROOT_PASSWORD that you set earlier. Now you should see mysql >
    • Type CREATE DATABASE db_name; (Replace db_name with the new name of your database)
    • Type exit; to drop out of the MySQL shell and then Ctrl/Cmd+D to drop out of the docker container.

    Now to set up Ghost.

    Create a Ghost container as per my guide here:

    Sidenote: The above link should be a bookmark and look fancy and shit, but because I am using a .blog TLD, it breaks! Mental! I have already reported it to the Ghost devs but they are not looking at it. 🙄

    When you are setting the “Environment Variables”, you will need to make the following additions:

    ⚠️
    • database__clientmysql
    • database__connection__host123.123.123.123 (Your Server IP address)
    • database__connection__userroot
    • database__connection__password**************
    • database__connection__databasedb_name
    • database__connection__port3007

    Press “OK” and this will create a blank new Ghost site.

    Create your site as per normal, then go to https://<site>/ghost/#/settings/labs to import your content.

    Then copy your content folder back to /var/ghost/my_new_awesome_ghost_container/content – Restart the Ghost container and most (if not all), your posts, content, themes and everything should be back.

    You can update the Ghost container as you would have before.

  • Quick Tip: Restore the older Volume Mixer in Windows 11

    Quick Tip: Restore the older Volume Mixer in Windows 11

    Recently Microsoft released an update for Windows 11 that doesn’t allow you to open the older version of the Volume Mixer.

    Old Volume Mixer
    New Volume Mixer within ‘Settings’

    To restore the old Volume Mixer, go to:

    Start >> Type into the search box sndvol.exe and press enter.

    This will open it up. Once it’s open, Right-click on the icon on the taskbar and click ‘Pin to taskbar’ and drag it beside the Start button for easy access.

    Way better than using the clunky ‘Settings’ menu.

  • How to upgrade Ghost 5 on Plesk Obsidian

    How to upgrade Ghost 5 on Plesk Obsidian

    This is a follow-on to my previous post about installing Ghost 5 on Plesk Obsidian. Please check it out!

    🚨

    This is actually really simple, but, we want to be protected first!

    Go into your Ghost site, click on the Cog “⚙” at the bottom and click on “Labs” and click on “Export your content” to download the content.

    When that is done, head into Plesk.

    • Go to “Docker” on the left-hand side.
    • Find your container. Eg. padraig_is_awesome
    • Click on “Details”
    • Click “Recreate”
    • Choose the latest version numbered. Do NOT choose latest
    In this example: “4.0.1 (Current)” is the version that I have installed currently and we want to choose “4.1.0” as the new version!
    • DO NOT CHECK THE BOX for “Reset variables to default”. This will break your site!
    • Click on “Recreate” and after a few seconds, it will be upgraded.

    You can check the version of your site by going into your Ghost admin panel, clicking on the avatar on the bottom left and clicking on “About Ghost”

Welcome to the new padraig.blog. If things feel off, please let me know on Mastodon
toggle