分类: Mysql/postgreSQL
2009-05-31 13:46:25
一.错误日志
错误日志在Mysql数据库中很重要,它记录着mysqld启动和停止,以及在运行过程中发生的任何错误的相关信息。
1.配置信息
--log-error=[file-name]用来指定错误日志存放的位置。
如果没有指定[file-name],默认hostname.err做为文件名,默认存放在DATADIR目录中。
也可以将log-error配置到my.cnf文件中,这样就省去了每次在启动mysqld时都手工指定--log-error.例如:
[mysql@test2]$ vi /etc/my.cnf
# The MySQL server
[mysqld]
....
log-error = /var/lib/mysql/test2_mysqld.err
.....
2.错误信息样板
080313 05:21:55 mysqld started
080313 5:21:55 InnoDB: Started; log sequence number 0 43655
080313 5:21:55 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.26-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)
080313 5:24:13 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown
080313 5:24:13 InnoDB: Starting shutdown...
080313 5:24:16 InnoDB: Shutdown completed; log sequence number 0 43655
080313 5:24:16 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete
080313 05:24:16 mysqld ended
080313 05:24:47 mysqld started
080313 5:24:47 InnoDB: Started; log sequence number 0 43655
080313 5:24:47 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.0.26-standard-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)
080313 5:33:49 [Note] /usr/local/mysql/bin/mysqld: Normal shutdown
ChinaUnix-ITpub网站MySQL技术征文大赛
作者:杨向勇