Tag archive for: MySQL

How to setup a Raspberry Pi LEMP server with Raspbian Buster Lite for running PHP applications

Many useful applications are written in PHP backed by MariaDB/MySQL for data persistency.

When you wondering what you can use a Raspberry Pi for, one way is to turn it into a LEMP server for hosting PHP applications.

With this in mind, let us look at how we can setup a Raspberry Pi LEMP server with Raspbian Buster Lite for running PHP applications.

How to start a blog about computer technology

Previously, I wrote about why programmers should blog. When you are convinced that you should blog as a programmer, you may wonder how to start a blog.

In order to have a place to refer people who wants to learn more about this topic, I write my experience in this article.

Given that in mind, this is how you can start a blog about computer technology.

How to setup phpMyAdmin on a Raspbian Stretch Lite, Nginx, MariaDB / MySQL and PHP 7 LEMP stack

The phpMyAdmin project is a solid software tool written in PHP, that can help us handle the administration of MySQL / MariaDB over the web.

phpMyAdmin Demo Server 4.7.8 demo screenshot

If you want to build your next project with a Raspbian Stretch Lite, Nginx, MariaDB / MySQL and PHP 7 LEMP stack, you may want to consider setting up phpMyAdmin as well. This post details how you can do so.

How to migrate your MySQL / MariaDB database with mysqldump, tar and scp

If you had been building the content for your new WordPress site on a Raspberry Pi 3, there will come a time when you need to migrate the underlying MySQL database to another machine, for eg. a DigitalOcean droplet, for production usage.

MySQL provides us with the mongodump client utility to produce a set of SQL statements that can be executed to reproduce the original database object definitions and table data.

A simple MySQL database migration can be performed with the following steps:

  1. Use mysqldump to get the set of SQL statements that can be executed to reproduce the original database object definitions and table data.
  2. If the mysqldump output is too big, use the tar command to compress it.
  3. Use the scp command to send the mysqldump output from the source server to the destination server.
  4. If you had used the tar command to compress the mysqldump output, use the tar command at the destination server to decompress it.
  5. Execute the set of SQL commands in the mysqldump output at the destination server.

This post documents how you can migrate your MySQL / MariaDB database with utilities provided by MySQL and most Linux servers.

Setting up a LEMP web server on Raspberry Pi 3 with an Ubuntu Server 15.10.3 image to host a WordPress website

I was trying to start a new WordPress site. Before hosting it on a Digital Ocean droplet, I decided to incubate the WordPress site on a Raspberry Pi 3 to clock some content. This post documents the steps that I took to set up a LEMP web server on Raspberry Pi 3 with an Ubuntu server 15.10.3 image to host a new WordPress site.

How I solved the database connection error from my WordPress installation which is hosted on the default PHP FPM server in Mac OS X EL Capitan

I was trying to setup a WordPress instance with the built-in PHP-FPM server on my Mac OS X el Capitan. After applying the relevant Nginx configurations for WordPress installations, I had been able to run the php codes from my WordPress instance.

However, when I tried to run the WordPress install script, my WordPress setup complained that it was unable to connect to the database server.

Code generator for list of countries

There was a second need for me to display a list of countries for my users to select. While the first required insertion of names of the countries into the database, the second required the list of countries to be populated as an array of data objects via Java.

Although the text list of countries from Pedro Posada is useful in both instances, it only fulfills part of what I need. In addition to the names, I need to include additional boiler plate coding to convert the text list of countries into usable forms for the two different programming requirements.

And since the list is more than a 100 items long, it will be more efficient to get the computer to generate the list of countries with the necessary boiler plate coding.