MySQL for the Internet of Things

(Steven Felgate) #1
Chapter 6 ■ Building low-Cost MysQl data nodes

if you have never used python or you would like to know more about it, the following are few good
books that introduce the language. a host of resources are also available on the internet, including the
python documentation pages at http://www.python.org/doc/.


  • Programming the Raspberry Pi by simon Monk (Mcgraw-hill, 2013)

  • Beginning Python from Novice to Professional, 2nd Edition, by Magnus lie hetland
    (apress, 2008)

  • Python Cookbook by david Beazley and Brian K. Jones (o’reilly Media, 2013)


interestingly, python was named after the British comedy troupe Monty python and not the reptile. as
you learn python, you may encounter campy references to Monty python episodes. having a fondness
for Monty python, i find these references entertaining. of course, your mileage may vary.

Installing Connector/Python


Downloading is the same process as you discovered for the server. You can download Connector/Python
from Oracle’s MySQL web site (http://dev.mysql.com/downloads/connector/python/). The page will
automatically detect your platform and show the available downloads for your platform. You may see several
choices. Be sure to choose the one that matches your configuration.


Installing on Desktop/Laptop Platforms


Since most platforms come with Python installed, you may not need to do anything to prepare your system;
just download the installer and install it. You can find the latest Python installers on the product download
page (http://dev.mysql.com/downloads/connector/python/). Note that Connector/Python requires
either Python 2.7 (recommended) or Python 3.3.
Figure 6-18 shows a typical download page for the Ubuntu platform. Use the drop-down box to select a
different platform if yours is not listed. However, if you use a platform such as Windows that does not include
Python, you should install Python first.

Free download pdf