MYSQL database ibdata1 file reduction and Error Log clearing methods mysql ibdata1 stores data, indexes, and so on, is the most important data of MYSQL. if you do not store the data separately, the size of the file will easily reach G, or even 10 + G. for some applications, this file is not suitable, so we need to narrow down the file. method: Separate data files. step: 1. back up the database from the command line to MySQL Server 5.0 \ bin to back up all the databases, and execute the command mysqldump-q-uusername-pyourpassword -- add-drop-table-all-databases>/all. after SQL completes this step, stop the database service. 2. modify the mysql configuration file my. INI file, add the following innodb_file_per_table configuration to use a separate innoDB file for each table, modify/etc/my. cnf file 3. delete original data file delete original ibdata 1 file and Log File ib_logfile *, delete the application database folder under the data Directory (do not delete the mysql folder) 4. restore database start Database Service from command line enter MySQL Server 5.0 \ bin restore all databases, Execute Command mysql-uusername-pyourpassword </all. after completing the preceding steps, you can see that the new ibdata1 file is only dozens of MB, and the data and indexes are converted into small ibd files for a single table. Mysql: log management: the mysql error log records the running status of the basic processes on the mysqd server. Command and configuration options: [--] log_error [= filen_ame] -- generate a new error log file when calling flush logs. Add the "old" suffix command and configuration options to the old file name: [--] log_warnings -- control mysql to record warning information to the error log file dynamic system variable: log_warnings -- control mysql to record warning information to the error log file command options: -- console redirects error logs to stderr -- generally, no command is specified on the screen, and the configuration options are [--] log_error [= filen_ame] -- specify commands and configuration options for error logs: [--] skip-syslog -- no error log is recorded