Created
May 17, 2016 19:21
-
-
Save arthurnn/2c2e8a4c5a2f15ab1f79acc5bc13dcfe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mysql2' | |
connection = Mysql2::Client.new(host: "127.0.0.1", port: 3306, username: "root", database: "test") | |
connection.automatic_close = false | |
p connection.query( "SELECT database();" ).to_a | |
fork { } | |
Process.wait | |
p connection.query( "SELECT database();" ).to_a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment