mysql备忘录

来源:互联网 发布:怎样查看淘宝账号等级 编辑:程序博客网 时间:2024/06/08 03:04

导出数据一条记录一个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 binaryor 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 informationcollection process might fail.key_buffer_size=8388608read_buffer_size=131072max_used_connections=53max_threads=151thread_count=53connection_count=53It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68009 K  bytes of memoryHope that's ok; if not, decrease some variables in the equation.Thread pointer: 0x1e92fdc0Attempting backtrace. You can use the following information to find outwhere mysqld died. If you see no messages after this, something wentterribly wrong...

my.ini中添加


early-plugin-load=keyring_file.so

sql_mode=NO_ENGINE_SUBSTITUTION
max_connections=500
max_allowed_packet = 900M

0 0
原创粉丝点击