How to configure the world's smallest MySQL server _ MySQL

Source: Internet
Author: User
Tags percona server yocto
IntelEdison is a compact computer that runs Linux at Mhz based on 22nm Silvermont dual-core IntelAtomCPU (the Ubuntu-based release version of Yocto ). To program Edison, we need an interface board. You can choose to 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/gzallhttp: // response

Then we need to install the library:

# Opkginstalllibaio1_0.3libcrypto1.0.0libssl1.0.0 [/code]

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

# Wgethttps: // response

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/cpuinfoprocessor: 0vendor_id: GenuineIntelcpufamily: 6 model: 74 modelname: GenuineIntel (R) CPU4000 @ 500MHz... mysql> SELECTBENCHMARK (10000000, ENCODE ('hello', 'Goodbye '); + ------------------------------------------- + | BENCHMARK (10000000, ENCODE ('hello', 'Goodbye ')) | + --------------------------------------------- + | 0 | + ----------------------------------------------- + 1 rowinset (18.77sec) [/code]

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> maketoast; [/code]

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!

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.