May 2019
Beginner to intermediate
466 pages
10h 44m
English
For starters, let's instruct our application to connect to and disconnect from our MySQL database. Let's extend our game by adding a new Database module within its corresponding file:
module Database using MySQL const HOST = "localhost" const USER = "root" const PASS = "" const DB = "six_degrees" const CONN = MySQL.connect(HOST, USER, PASS, db = DB) export CONN disconnect() = MySQL.disconnect(CONN) atexit(disconnect) end
Your Database.jl file should look like the snippet—with the exception maybe of the actual connection data. Please set up the HOST, USER, and PASS constants with your correct MySQL connection info. Also, please don't forget to create a new, empty database called six_degrees—otherwise the connection ...
Read now
Unlock full access