导出数据一条记录一个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