Storing data in MySQL
MySQL is undeniably the most popular open source SQL database. Dart can talk to MySQL using the pub package sqljocky
by James Ots (https://github.com/jamesots/sqljocky). In this section, we will demonstrate how to use this driver step by step. You can see it in action in the using_mysql
project.
Getting ready
- To get the database software, download and install the MySQL Community Server installer from http://dev.mysql.com/downloads/mysql/. This is straightforward. However, if you need any help with the installation, visit http://dev.mysql.com/doc/refman/5.7/en/installing.html.
- Run the MySQL database system by starting
mysqld
on a command prompt from the bin folder of the MySQL installation. We need to create a database and table to store data. The easiest way is to start the MySQL Workbench program, make a connection, and then click on the button Create a new schema in the connected server, name itjobsdb
, and click on apply. - Select the schema by double-clicking on it,...