摘要: mysql日期和字符相互转换 date_format(date,'%Y %m %d') str_to_date(date,'%Y %m %d') %Y:代表4位的年份 %y:代表2位的年份 %m:代表月, 格式为(01……12) %c:代表月, 格式为(1……12) %d:代表月份中的天数,格式为( 阅读全文
posted @ 2017-06-26 17:15 乱笙歌 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 列出数据库:show databases; 选择数据库:use databaseName; 列出表格:show tables; 显示表格列的属性:show columns from tableName; Desc tableName; 执行sql文件:source fileName.txt; 匹配字 阅读全文
posted @ 2017-06-26 17:15 乱笙歌 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1.导出整个数据库 mysqldump u 用户名 p 数据库名 导出的文件名 mysqldump u wcnc p smgp_apps_wcnc wcnc.sql 2.导出一个表 mysqldump u 用户名 p 数据库名 表名 导出的文件名 mysqldump u wcnc p smgp_ap 阅读全文
posted @ 2017-06-26 17:14 乱笙歌 阅读(110) 评论(0) 推荐(0) 编辑
摘要: CAST(expr AS type), CONVERT(expr,type), CONVERT(expr USING transcoding_name) The CAST() and CONVERT() functions take a value of one type and produce a 阅读全文
posted @ 2017-06-26 17:14 乱笙歌 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 如何将中文数据插入到mysql数据库。 step1, 要保证数据库支持中文。 create database jd1301db default character set utf8; step2, 数据库连接字符串:jdbc:mysql://localhost:3306/jd1301db?useUn 阅读全文
posted @ 2017-06-26 17:13 乱笙歌 阅读(208) 评论(0) 推荐(0) 编辑
摘要: SELECT FROM book limit 2,1 2是index ,1是几条数据 阅读全文
posted @ 2017-06-26 17:13 乱笙歌 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 清理日志 cp /dev/null nohup.out ls ( a点开头的为隐藏文件, F显示文件夹, t 按时间排序 ll t|tac 按时间倒序, R 列子目录, l 列出long信息,–help 列出帮助信息 r 时间倒序) 统计大小 du sh 查看一个目录大小( disk usage s 阅读全文
posted @ 2017-06-26 17:12 乱笙歌 阅读(168) 评论(1) 推荐(0) 编辑
摘要: cd ~/.ssh/ ssh keygen 把本地的id_rsa.pub 内容复制到.ssh/authorized_keys chmod o w ~/;chmod 700 ~/.ssh;chmod 600 ~/.ssh/authorized_keys 阅读全文
posted @ 2017-06-26 17:11 乱笙歌 阅读(159) 评论(0) 推荐(0) 编辑
摘要: /etc/bashrc(系统) ~/.bash_profile(用户) macvim alias vim="mvim" alias ll="ls ltr" alias e="open n /Users/holyant/eclipse/jee mars2/Eclipse.app" alias dev= 阅读全文
posted @ 2017-06-26 17:11 乱笙歌 阅读(229) 评论(0) 推荐(0) 编辑
摘要: vim ~/.vimrc set tabstop=4 set nu :set hlsearch 高亮搜索结果,所有结果都高亮显示,而不是只显示一个匹配。 :set nohlsearch 关闭高亮搜索显示 :nohlsearch 关闭当前的高亮显示,如果再次搜索或者按下n或N键,则会再次高亮。 :se 阅读全文
posted @ 2017-06-26 17:11 乱笙歌 阅读(119) 评论(0) 推荐(0) 编辑