Win下:
开始,运行
停止:net stop mysql
启动:net start mysql
前提MYSQL已经安装为windows服务
开启日志
打开my.ini文件,在文件最后加上以下文字:
写道
#Enter a name for the binary log. Otherwise a default name will be used.
#log-bin=
#Enter a name for the query log file. Otherwise a default name will be used.
log= "D:/MySQL/MySQL Server 5.1/logs/query.log"
#Enter a name for the error log file. Otherwise a default name will be used.
log-error= "D:/MySQL/MySQL Server 5.1/logs/errorlog.log"
#Enter a name for the update log file. Otherwise a default name will be used.
log-update= "D:/MySQL/MySQL Server 5.1/logs/update.log"
查看日志命令:
mysql> show master status;