How to configure the world's smallest MySQL Server

Source: Internet
Author: User
Tags percona percona server yocto

How to configure the world's smallest MySQL Server

Configure the world's smallest MySQL Server-how to install a MySQL server on an Intel Edison control panel.

Introduction

In my recent blog post on IOT, messaging, and MySQL, I showed if the Particle Photon Board begins to build your own Iot. The implementation is great, but because the Particle Photon Board does not have any local storage, it requires stable Internet (Wi-Fi) access. If you do not have a reliable network access (for example, in some remote areas) or need something small to store data, you can now use Intel Edison. I even installed MySQL on Edison, making it the smallest MySQL server in the world (in size! Other options include:

  • Raspberry Pi (my college student installed the Percona server on the Raspberry PI)
  • Android-based systems (for example, Nexus 7: Vadim has installed the Percona server on Nexus 7)

MySQL Configuration

Intel Edison is a compact computer that runs Linux (the Ubuntu-based release version of Yocto) at 500 MHz Based on 22 nm Silvermont dual-core Intel Atom CPU ). To program Edison, we need an interface board. You can select an Arduino-compatible interface board (including an SD card) and an Intel interface board.

Installation and configuration are intuitive. I used the guide for enabling the Yocto project on the Intel Edison board to install and configure the board. First, we need to connect to Edison through the serial port and configure sshd and Wi-Fi. Then we can connect to Edison through SSH.

Because Linux binary files are compatible with Yocto Linux (you do not need to compile anything), MySQL installation is relatively simple. There are two pitfalls:

  • By default, the Yocto linux (and official resource libraries) does not contain the libraries required by MySQL: libaio1, libcrypto, and libssl.

  • Internal Storage is relatively small, while MySQL 5.7 binary files are not suitable for any partition. I must delete some "tests" and other things that I don't need. You can use an SD card for installation (SD is available on some boards ).

To install the library file, I followed this excellent guide: Edison package repo configuration, using an unofficial Edison repository. The setting is simple:

To configure your Edison to get the package from this repo, replace the following with something in the/etc/opkg/base-feeds.conf (Other opkg configuration files do not need to be changed ):

Src/gz all http://repo.opkg.net/edison/repo/all
Http://repo.opkg.net/edison/repo/edison src/gz edison
Src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32

Then we need to install the Library:
 
# Opkg install libaio1_0.3 libcrypto1.0.0 libssl1.0.0

Finally, we can download Percona Server 5.6 and put it somewhere (use basedir in my. cnf to point to the installation path ):

# Wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.25-73.1/binary/tarball/Percona-Server-5.6.25-rel73.1-Linux.i686.ssl100.tar.gz

Note that the latest Percona Server 5.6 depends on the Numa library, but does not have such a library for Yocto (it does not affect Edison ). Therefore, 5.6.25 is the latest Percona server that you can install here.

The following is a simple (and useless) benchmark test conducted on Intel Edison:

Root @ edison:/usr/local/mysql # cat/proc/cpuinfo
Processor: 0
Vendor_id: GenuineIntel
Cpu family: 6
Model: 74
Model name: Genuine Intel (R) CPU 4000 @ 500 MHz
...
Mysql> select benchmark (10000000, ENCODE ('hello', 'Goodbye '));
+ ----------------------------------------------- +
| BENCHMARK (10000000, ENCODE ('hello', 'Goodbye ') |
+ ----------------------------------------------- +
| 0 |
+ ----------------------------------------------- +
1 row in set (18.77 sec)
 

Can MySQL bake toast for you?

The famous MySQL Bug #2 was submitted on July 15, September 12, 2002 and states that "MySQL Connector/J cannot be toasted ". Now we can fix this bug by using an Intel Edison and Arduino compatible interface board: not only MySQL ctor/J, but MySQL server itself can also bake for you! You can use UDF or the Query Rewrite plug-in MySQL 5.7. Therefore, you can execute MySQL Query:

Mysql> make toast;

For the actual implementation, you can "black" off a hand toaster to access the pins of the interface board, or use a Robotic Arm compatible with Arduino. Okay, MySQL. just bake for me!

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.