require "mysql2"
client = Mysql2::Client.new(
host: "127.0.0.1",
username: "root",
password: "12345",
port: 3306,
database: "development"
)
client.query("SELECT * FROM users;").
module Database
CREDENTIALS = {
host: "127.0.0.1",
username: "root",
password: "12345",
port: 3306,
database: "development"
}
end
require "mysql2"
client = Mysql2::Client.new(Database::CREDENTIALS)
client.query("SELECT * FROM users;").