mysql备忘录

导出数据一条记录一个sql

mysqldump  -h127.0.0.1 -P3306 -t -uroot  -p123 --complete-insert --skip-extended-insert --databases db3  --tables e_result_detail   --where=" p_date >= '2016-03-01'" >c://e_result_detail_new.sql

参数 :--skip-extended-insert 会整个一个长串的insert

  --complete-insert  会显示字段名称

mysql --default-character-set=utf8 -h127.0.0.1 -P3306 -uroot -p123 -e"SELECT * from e_teacher" db3

  执行sql并且得到结果

  db3是数据库名称,指定的数据库


一个mysql的优化策略

点击打开链接


报错信息...mysql5.7绿色版本报错信息

之前的报错

[ERROR] Plugin keyring_file reported: 'keyring_file initialization failure. Please check if the keyring_file_data points to readable keyring file or keyring file can be created in the specified location. The keyring_file will stay unusable until correct path to the keyring file gets provided'


02:44:43 UTC - mysqld got exception 0xc000001d ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.

key_buffer_size=8388608
read_buffer_size=131072
max_used_connections=53
max_threads=151
thread_count=53
connection_count=53
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68009 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x1e92fdc0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...

my.ini中添加


early-plugin-load=keyring_file.so

sql_mode=NO_ENGINE_SUBSTITUTION
max_connections=500
max_allowed_packet = 900M

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值