ブックマーク / hirose31.hatenablog.jp (2)

  • 快適mysqlコマンド★カスタマイズの決定版 - (ひ)メモ

    この記事は MySQL Casual Advent Calendar 2013 の25日目の記事です。 自分の過去のブログも含めて、mysqlコマンドのカスタマイズについていろいろな情報がありますが、わたしがオススメの秘伝のタレをまとめたいと思います。是非、ご参考に。 定型文(SQL)のショートカット入力 「show create table TABLENAME\G」とか「select user,host,password from mysql.user order by user,host;」とか、よく実行するけど長くて入力するのがめんどうなのがありますよね。それをショートカットで入力できるようにする方法です。 mysqlコマンドで行編集ができるのは、readlineやlibeditをリンクしているおかげです。 従来の公式バイナリ配布物に含まれるmysqlコマンドはreadlineでした

    快適mysqlコマンド★カスタマイズの決定版 - (ひ)メモ
    pullphone
    pullphone 2013/12/25
  • my.cnfで外部ファイルをinclude - (ひ)メモ

    某Sさんに教えてもらいました。m(_ _)m Beginning with MySQL 5.0.4, it is possible to use !include directives in option files to include other option files and !includedir to search specific directories for option files. For example, to include the /home/mydir/myopt.cnf file, you can use the following directive: !include /home/me/myopt.cnf To search the /home/mydir directory and read option files found there, you

    my.cnfで外部ファイルをinclude - (ひ)メモ
    pullphone
    pullphone 2012/11/13
    「!include 〜〜〜」でincludeできるらしい。メモリとかCPU周りの設定を外に出して後は共通設定にするとかできそう。
  • 1