mysql> show processlist;desc table.columnいちいち長い show columns from table名としなくても、desc column名で見れる。
+-----+------+-----------+---------+---------+------+------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+---------+---------+------+------------------+------------------+
| 217 | root | localhost | kapi_jp | Connect | 1023 | Reading from net | NULL |
| 218 | root | localhost | rdblog | Connect | 1022 | Reading from net | NULL |
| 219 | root | localhost | kapi_jp | Sleep | 566 | | NULL |
| 221 | root | localhost | rdblog | Connect | 550 | Reading from net | NULL |
| 222 | root | localhost | kapi_jp | Query | 0 | NULL | show processlist |
+-----+------+-----------+---------+---------+------+------------------+------------------+
5 rows in set (0.00 sec)
mysql> desc rss_log;Userパスワードの変更
+-------------+---------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+---------------------+------+-----+---------------------+----------------+
| id | bigint(20) unsigned | | PRI | NULL | auto_increment |
| site_id | int(11) | | | 0 | |
| title | text | | | | |
| link | text | | MUL | | |
| value | text | | | | |
| attention | int(11) | YES | | 0 | |
| status | int(11) | YES | | 0 | |
| updated | datetime | | | 0000-00-00 00:00:00 | |
| create_date | datetime | | | 0000-00-00 00:00:00 | |
+-------------+---------------------+------+-----+---------------------+----------------+
set password for [user]@[host] = password('[password]')ログイン中のユーザーのpasswordを変更するには
mysql> set password = password('[password]');select benchmark負荷テスト
mysql> select benchmark(100000000, 1+1);
+---------------------------+
| benchmark(100000000, 1+1) |
+---------------------------+
| 0 |
+---------------------------+
1 row in set (2.24 sec)
http://kapi.jp/kapi_blog/106
2008年01月15日
関連カテゴリ Mysql