[coolwind@localhost ~]$ mysql -uroot -S /usr/local/mysql/data/3307/mysql.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 72144 Server version: 5.1.40-community-log MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> select version(); +----------------------+ | version() | +----------------------+ | 5.1.40-community-log | +----------------------+ 1 row in set (0.00 sec)mysql> \! df -h 檔案系統 容量 已用 可用 已用% 掛載點 /dev/sda3 95G 22G 69G 25% / /dev/sda5 95G 21G 69G 24% /home /dev/sda2 284G 6.4G 263G 3% /var /dev/sda1 99M 35M 60M 37% /boot tmpfs 3.9G 0 3.9G 0% /dev/shm /dev/sdb1 12T 5.7T 5.4T 52% /mnt/amtb mysql> 这是在mysql命令行中,linux下可以运行外部命令!
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 72144
Server version: 5.1.40-community-log MySQL Community Server (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> select version();
+----------------------+
| version() |
+----------------------+
| 5.1.40-community-log |
+----------------------+
1 row in set (0.00 sec)mysql> \! df -h
檔案系統 容量 已用 可用 已用% 掛載點
/dev/sda3 95G 22G 69G 25% /
/dev/sda5 95G 21G 69G 24% /home
/dev/sda2 284G 6.4G 263G 3% /var
/dev/sda1 99M 35M 60M 37% /boot
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sdb1 12T 5.7T 5.4T 52% /mnt/amtb
mysql>
这是在mysql命令行中,linux下可以运行外部命令!