06 - controlling mysql on unix.rb
来自「O Reilly Ruby Cookbook source code」· RB 代码 · 共 11 行
RB
11 行
def mysql(opts, stream) IO.popen("mysql #{opts}", 'w') { |io| io.puts stream }end#---mysql '-u root -p[password]', <<-end drop database if exists website_db; create database website_db; grant all on website_db.* to #{`id -un`.strip}@localhost;end#---
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?