![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
qq_20064245
这个作者很懒,什么都没留下…
展开
-
mysql服务器的安装
Mysql 安装1) 准备[root@yun02 ~]# groupadd mysql[root@yun02 ~]# useradd mysql -g mysql -M -s /sbin/nologin 2)downlaod mysql for linux from www.mysql.com版本选择:5.5 其次是5.1或5.6,选择连续较长时间没有更新的版本,跟dba原创 2017-08-27 10:39:50 · 266 阅读 · 0 评论 -
mysqldump
1) export 整个 db,1) 导出数据 mysqldump -u root -p -t db> file# mysqldump -u root -p -t test> order.sql2) 导出schemal mysqldump -u root -p -d db > filemysqldump --opt -d test -u root -p > ord原创 2017-08-27 11:14:32 · 361 阅读 · 0 评论 -
mysql 学习笔记
mysql - study1) db 创建数据库 create database if not exists testdb;删除数据库 drop database if exists testdb;数据库更名 导出数据,然后重建,然后在进行导入数据2) tablecreate table table_user(id int(4),name原创 2017-08-27 16:54:01 · 232 阅读 · 0 评论 -
mysql 添加用户和数据库
CREATE DATABASE IF NOT EXISTS monitor default charset utf8 COLLATE utf8_general_ci; GRANT ALL PRIVILEGES ON monitor.* TO 'monitor'@'%' IDENTIFIED BY '123456'; flush privileges;原创 2017-10-24 18:05:27 · 372 阅读 · 0 评论 -
mysql 分组topN
比较快的实现:select a.* from his_tender_count a join (select trans_month,max(create_time)as create_time from his_tender_count group by trans_month) b on a.trans_month=b.trans_month and a.create_time=b.cre原创 2017-12-25 16:23:45 · 912 阅读 · 0 评论 -
shell 查询mysql 导出部分数据
$ mysql -u monitor -p 111111 -e "select * from monitor_field where create_time between '2018-01-09 00:00:00'and '2018-01-09 17:00:00' " > monitor.out Enter password:原创 2018-01-10 09:41:42 · 1171 阅读 · 0 评论