修改my.cnf配置文件

/usr/local/mysql/bin/mysql --verbose --help | grep -A 1 'Default options' 

Default options are read from the following files in the given order:

/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf

修改/etc/my.cnf,找到[mysqld],在下面添加: 

general_log         = 1
general_log_file = "E:/data/mysql.log" 修改完后,记得重启mysql服务哦

不修改配置实现,通过开启服务指定参数实现

[root@iZwz9ga7ceehy3fbxvmmtbZ ~]# ps -ef|grep mysql
kill -9 1613
nohup /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/home/data/mysql --plugin-dir=/usr/local/mysql/lib/plugin --user=root --log-error=/home/data/mysql/localhost.localdomain.err --general-log=1 --general-log-file=/tmp/mysql.log --pid-file=/home/data/mysql/localhost.localdomain.pid --socket=/tmp/mysql.sock --port=3306 &

最新文章

  1. C语言-两个库函数
  2. 5.3(2)----机器人走方格2(CC150)
  3. CSS 外边距合并
  4. Description of security events in Windows 2003/7/2008
  5. C/C++内存泄漏及检测 转
  6. preventDefault()方法
  7. centos中设置apache显示目录列表
  8. 欧拉工程第72题:Counting fractions
  9. [转载]C# 判断字符是否中文还是英文
  10. /etc目录深入理解
  11. Coins(hdu 2844 多重背包)
  12. Valgrind检测内存泄露简介
  13. asp.net core 三 Nuget包管理
  14. 认识uWSGI、uwsgi、wsgi
  15. 【洛谷P1226 【模板】快速幂||取余运算】
  16. FAT文件系统规范v1.03学习笔记---4.文件和目录数据区之长目录项
  17. HDU 2888 Check Corners (模板题)【二维RMQ】
  18. bash shell(4):读取文件大小,移动文件,复制文件,字符串转数字
  19. [LOJ6029~6052]雅礼集训 2017 选做
  20. goldarch企业管理软件框架整体解决方案终于出来了

热门文章

  1. maven 其他远程仓库配置
  2. 升级openssl 到 1.0.1s 最新版
  3. 多线程实现方式---实现Runnable接口
  4. react-redux: counter
  5. 【机器学习】Boosting和Bagging的差别
  6. python学习之面向对象(上)
  7. 判定客户端IP所在的省市[2]
  8. Javascript的异常捕获机制
  9. JDBC 3 通过PreparedStatement 对数据库进行增删改查
  10. GDI与OpenGL与DirectX之间的区别