Guest User

Untitled

a guest
Oct 21st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # passwordとdatabase名は適宜変更してください
  2. require 'mysql2'
  3.  
  4. client = Mysql2::Client.new(host: 'localhost', username: 'root', password: 'your_password', database: 'your_database_name')
  5. puts client
  6.  
  7. # 以下のような表示されたらMySQLが使えます
  8. #<Mysql2::Client:......>
Add Comment
Please, Sign In to add comment