How to Make MySQL and Spring-Boot CRUD application for Raspberry Pi

In this post, I will share how to make a very basic Spring Boot application and database with MySQL with Raspberry Pi.

Perquisites:

  • I will assume you know Git and Source Control and you know how to set up a Raspberry Pi.

Lets Start:

Installing MySQL Raspberry Pi

Using some information from this guide, you will need to install MySQL and drivers. Php is not needed for this.

  • Open up your terminal on your Raspberry Pi
  • sudo apt-get install mysql-server --fix-missing
  • Agree  to all of the install terms
  • Create a password for your MySQL database when required
  • sudo apt-get install mysql-client php5-mysql
  • Agree to all of the install terms

MySQL should be installed correctly on your Raspberry Pi.

Installing Maven

You will need Apache Maven to run the application on your Raspberry Pi.

I will summarise this tutorial as this is what I used:

Before starting developing the Application, I advise you use an IDE on a main computer and Git with source control to transfer it over.

  • Create an account on GitHub to store the project that will be created in the next part
  • Once created, clone the repository onto the Raspberry Pi and your laptop or desktop development environment

From Spring Boot’s website we’ll follow this guide.

You should build this application on your GitHub repository that you created earlier and pull it via command line on your Raspberry Pi as this will keep the development fast.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s