Skip to content

Instantly share code, notes, and snippets.

@shimakyohsuke
Last active August 29, 2015 14:26
Show Gist options
  • Save shimakyohsuke/c0b03c1cacec515f59b7 to your computer and use it in GitHub Desktop.
Save shimakyohsuke/c0b03c1cacec515f59b7 to your computer and use it in GitHub Desktop.
mycli を vccw で使ってみる

VCCW

Vagrant based development environment for WordPress plugins, themes, or websites.

http://vccw.cc/

mycli

Mycli is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.

http://mycli.net/

参考

mycliでMySQLコマンドの補完機能を簡単に使う
http://qiita.com/shojimotio/items/efc8fce9ce3ebe179897


ssh login

$ vagrant ssh
[vagrant@vccw ~]$

pip install

Installation — pip 7.1.0 documentation
https://pip.pypa.io/en/stable/installing.html

ここからもらう

[vagrant@vccw ~]$ curl https://bootstrap.pypa.io//get-pip.py | python

[vagrant@vccw ~]$ pip -V
pip 7.1.0 from /usr/lib/python2.6/site-packages (python 2.6)

[vagrant@vccw ~]$ pip install mycli

Example

[vagrant@vccw ~]$ mycli
Version: 1.0.1
Chat: https://gitter.im/dbcli/mycli
Mail: https://groups.google.com/forum/#!forum/mycli-users
Home: http://mycli.net
Thanks to the contributor - Whitane Tech

mysql vagrant@localhost:(none)> SHOW DATABASES
+--------------------+
| Database           |
|--------------------|
| information_schema |
| test               |
+--------------------+
2 rows in set
Command Time: 0.000s
Format Time: 0.000s
[vagrant@vccw ~]$ mycli -u root -p
Password:(DEFAULT_PASSWORD)
Version: 1.0.1
Chat: https://gitter.im/dbcli/mycli
Mail: https://groups.google.com/forum/#!forum/mycli-users
Home: http://mycli.net
Thanks to the contributor - Norbert Spichtig
mysql root@localhost:(none)> SHOW DATABASES
+--------------------+
| Database           |
|--------------------|
| information_schema |
| mysql              |
| performance_schema |
| test               |
| wordpress          |
| wordpress_test     |
| wp-test            |
+--------------------+
7 rows in set
Command Time: 0.000s
Format Time: 0.001s
mysql root@localhost:(none)> quit
Goodbye!

使う機会あまりないけどオートコンプリートは便利☆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment