Home
  • Intro
  •  
  • Energy
    • Energy diversion
    • My Energy Diverter
    • Oven control
    • Resources
  •  
  • Banana Pi M5
    • Install Armbian
    • Setting up
    • SSH connection
    • Static IP address
    • Install SAMBA
    • Install Apache
    • Install MySQL
    • Install PHP
    • Install phpMyAdmin
    • Install FTP server
    • Add web site
    • erase eMMC
  •  
  • Arduino
    • Programming
    • Connecting to PHP/MySQL
  •  
  • Energy app
    • Example
  •  
  • Music server (NAS)
    • miniDLNA
    • Installing on BPi-M5
    • Uploading files

MySQL

MySQL is ".. an open source, web server based database". It's universally used and is an industry 'standard' database for web servers.

If you wish to record data from your sensors this is what you need.
It is step 2 in making your BPi-M5 able to manage and record all your home sensors.


To install MySQL

Log in as root privileged su:
Just in case, update your system ...

BPiM5:yourname:# apt-get update -y && apt-get upgrade -y

Install MySQL ..

BPiM5:yourname:# apt install mysql-server -y

You must now run though some seurity points

BPiM5:yourname:# mysql_secure_installation

This script will ask you several questions.

  • Do you wish to install the Validate Password Plugin?
    VALIDATE PASSWORD PLUGIN can be used to test passwords and improve security. It checks the strength of password and allows the users to set only those passwords which are secure enough.
    I usually type N (no) since the server is on a local network, not open to the ourside world.
  • The script will ask you to set a password - for the root MySQL user. Enter a password & re-enter.
  • The script will ask you to remove anonymous users. Answer: Y
  • Remove anonymous users: Y
    This is intended only for testing.
  • The script will ask if you want to disallow root login remotely. Answer: Y
  • The script will ask to remove the test database and access to it. Answer: Y
  • The script will asku to reload the privilege tables. Answer: Y
  • ..and finally, the script's complete, MySQL is installed.
Next step: installing PHP scripting language Next