Linux 下使用mysql:
http://www.jb51.net/article/84399.htm 讲的很好适合新手,
http://www.jb51.net/article/84426.htm 这是第二
http://www.jb51.net/article/84484.htm 三
http://www.cnblogs.com/xxoome/p/5864912.html
http://www.linuxidc.com/Linux/2017-05/143861.htm //mysql 安装
补充:
- 退出mysql 命令为:quit
从数据库取数据
$total = $this->dao->select('
estimate AS totalEstimate,
consumed AS totalConsumed
')
->from(TABLE_TASK)
->where('project')->eq((int)$projectID)
->andWhere('status')->ne('cancel')
->andWhere('deleted')->eq(0)
->fetchAll();
fetchAll();取 多条数据
//执行 某 sql文件
source ~/dev/bupt/db/install.sql
~/dev/bupt/db$ mysql -uroot -p 数据库名 < install.sql
Database : 数据库
changed : 变化的
SELECT : 选择
ORDER BY : 排序
ASC : 升序
DESC : 降序
GROUP BY : 分类
OPERATOR : 运算符
structrue : 信息结构
DROP : 停止
EXISTS : 存在
mysql导入将sql文件导入数据库 : mysql -uroot -p 数据库 <sql所在目录