| log_warnings | 1 |
通常errlog的配置参数一般是
log_error =/path/to/somefie
log_warnings ={1|0}
日志的相关功能是全局的,有些功能是静态定义的
[root@localhostdata]# pwd
/mydata/data
[root@localhostdata]# hostname
localhost
[root@localhostdata]# ll | grep err
-rw-r----- 1 mysqlroot 6220 Mar 31 14:32 localhost.err
-rw-r----- 1 mysqlroot 68129 Feb 26 09:30 test3.err
查看错误日志:
首先重启一下mysql服务进程,并观察错误日志:
[root@localhostdata]# tail -20 localhost.err
140331 14:32:02[Note] /usr/local/mysql/bin/mysqld: Shutdown complete
140331 14:32:02mysqld_safe mysqld from pid file /mydata/data/localhost.pid ended
140331 14:32:02mysqld_safe Starting mysqld daemon with databases from /mydata/data
140331 14:32:03[Note] Plugin 'FEDERATED' is disabled. #初始化存储引擎
140331 14:32:03InnoDB: The InnoDB memory heap is disabled #innodb禁用了堆功能
140331 14:32:03InnoDB: Mutexes and rw_locks use GCC atomic builtins #互斥量和行级锁是GCC编制的
140331 14:32:03InnoDB: Compressed tables use zlib 1.2.3
140331 14:32:03InnoDB: Using Linux native AIO
140331 14:32:03InnoDB: Initializing buffer pool, size = 128.0M #innodb存储引擎的缓冲池(buff poll)一般需要改的,而且需要改的特别大,一般8G内存分配给其5G都不足为过(专用于mysql场景)
因此可以观察此文件来观察缓冲池到底占用多少内存
140331 14:32:03InnoDB: Completed initialization of buffer pool
140331 14:32:03InnoDB: highest supported file format is Barracuda.
140331 14:32:03 InnoDB: Waiting for the background threads tostart
140331 14:32:04InnoDB: 5.5.33 started; log sequence number 2856278
140331 14:32:04[Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 #服务已经运行并监听在本地0.0.0.0的 3306端口
140331 14:32:04[Note] - '0.0.0.0' resolves to'0.0.0.0'; #0.0.0.0反解失败
140331 14:32:04[Note] Server socket created on IP: '0.0.0.0'.
140331 14:32:04[Note] Event Scheduler: Loaded 0 events #时间调度器没有进行任何调度
140331 14:32:04[Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version:'5.5.33-log' socket:'/tmp/mysql.sock' port: 3306 MySQL Community Server (GPL) #mysql已经启动并在/tmp/目录下生成mysql.sock文件