方法1 备份 SELECT * INTO OUTFILE "D:\\1.sql" FROM 表名; 恢复 LOAD DATA INFILE "D:\\1.sql" INTO TABLE 表名; 补充几个设置 FIELDS TERMINATED BY ',' #字段间隔符 OPTIONALLY ENCLOSED BY '"' #字符串类型字段包围符 LINES TERMINATED BY '\n' #换行符 于是备份命令
在命令行输入密码,就会提示这些安全警告信息。 Warning: Using a password on the command line interface can be insecure. 注: mysql -u root -pPASSWORD 或 mysqldump -u root -pPASSWORD 都会输出这样的警告信息. 1、针对mysql mysql -u root -pPASSWORD