设为首页 加入收藏

TOP

mysql学习记录(二十四)--mysql相关工具(二)
2015-11-21 01:27:40 来源: 作者: 【 】 浏览:1
Tags:mysql 学习 记录 二十四 --mysql 相关 工具
\g. Your MySQL connection id is 49 Server version: 5.5.44-log Source distribution Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use sakila; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed abc@ubuntu:~$ mysql -uroot -p(密码) -e 'use sakila;select * from payment limit 5;'; +------------+-------------+----------+-----------+--------+---------------------+---------------------+ | payment_id | customer_id | staff_id | rental_id | amount | payment_date | last_update | +------------+-------------+----------+-----------+--------+---------------------+---------------------+ | 1 | 1 | 1 | 76 | 2.99 | 2005-05-25 11:30:37 | 2006-02-15 22:12:30 | | 2 | 1 | 1 | 573 | 0.99 | 2005-05-28 10:35:23 | 2006-02-15 22:12:30 | | 3 | 1 | 1 | 1185 | 5.99 | 2005-06-15 00:54:12 | 2006-02-15 22:12:30 | | 4 | 1 | 2 | 1422 | 0.99 | 2005-06-15 18:02:53 | 2006-02-15 22:12:30 | | 5 | 1 | 2 | 1476 | 9.99 | 2005-06-15 21:08:46 | 2006-02-15 22:12:30 | +------------+-------------+----------+-----------+--------+---------------------+---------------------+ abc@ubuntu:~$ mysql -uroot -p(密码) -e 'use sakila;select * from payment limit 5;' -E; *************************** 1. row *************************** payment_id: 1 customer_id: 1 staff_id: 1 rental_id: 76 amount: 2.99 payment_date: 2005-05-25 11:30:37 last_update: 2006-02-15 22:12:30 *************************** 2. row *************************** payment_id: 2 customer_id: 1 staff_id: 1 rental_id: 573 amount: 0.99 payment_date: 2005-05-28 10:35:23 last_update: 2006-02-15 22:12:30 *************************** 3. row *************************** payment_id: 3 customer_id: 1 staff_id: 1 rental_id: 1185 amount: 5.99 payment_date: 2005-06-15 00:54:12 last_update: 2006-02-15 22:12:30 *************************** 4. row *************************** payment_id: 4 customer_id: 1 staff_id: 2 rental_id: 1422 amount: 0.99 payment_date: 2005-06-15 18:02:53 last_update: 2006-02-15 22:12:30 *************************** 5. row *************************** payment_id: 5 customer_id: 1 staff_id: 2 rental_id: 1476 amount: 9.99 payment_date: 2005-06-15 21:08:46 last_update: 2006-02-15 22:12:30 abc@ubuntu:~$ cd ~/Downloads/ abc@ubuntu:~/Downloads$ mkdir mysql abc@ubuntu:~/Downloads$ cd mysql/ abc@ubuntu:~/Downloads/mysql$ vi a.sql; (在此步添加了一些内容) abc@ubuntu:~/Downloads/mysql$ more a.sql; insert into t2 values (1); insert into t2 values (2222222222222222222222222); insert into t2 values (3); abc@ubuntu:~/Downloads/mysql$ mysql -uroot -p(密码); Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 53 Server version: 5.5.44-log Source distribution Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input sta
首页 上一页 1 2 3 4 5 6 下一页 尾页 2/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇mysql删除不彻底的解决方法 下一篇mysql学习记录(二十五)--mysql..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: