Fork me on GitHub
摘要: 1 查看文件的前多少行 head -100 app.log 2 查看文件的后多少行 tail -100 app.log 3 查看文件的几行到几行 sed -n '10,100p' app.log 1 查看文件的前多少行 head -100 app.log 2 查看文件的后多少行 tail -100 阅读全文
posted @ 2018-12-17 13:56 北斗2016 阅读(203) 评论(0) 推荐(0) 编辑
摘要: MySQL中默认字符集的设置有四级:服务器级,数据库级,表级 。最终是字段级 的字符集设置。注意前三种均为默认设置,并不代码你的字段最终会使用这个字符集设置。所以我们建议要用show create table table ; 或show full fields from tableName; 来检查 阅读全文
posted @ 2018-12-17 13:48 北斗2016 阅读(159) 评论(0) 推荐(0) 编辑
摘要: grant all privileges on *.* to 'root'@‘%’ identified by '123456'; *.* 表示所有资源。 刷新权限 flush privileges; 阅读全文
posted @ 2018-12-17 11:44 北斗2016 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 查看数据库的字符编码。 mysql> \s show variables like '%char%'; 查看新建数据库编码 show create database db1; 设置编码格式,会话级别 set character_set_server=utf8; 设置编码格式,全局 set globa 阅读全文
posted @ 2018-12-17 11:26 北斗2016 阅读(267) 评论(0) 推荐(0) 编辑