VPS侦探论坛

 找回密码
 注册
查看: 3151|回复: 2

求救my.cnf文件的配置信息!

[复制链接]
发表于 2017-8-23 21:15:24 | 显示全部楼层 |阅读模式

由于本人疏忽用远程软件编辑了my.cnf信息但是却没上传至服务器,而导致my.cnf文件内的信息丢失成为空文件,希望可以有哪个朋友可以提供一下my.cnf文件的配置信息.
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-8-24 09:01:41 | 显示全部楼层


mysql版本不同、机器配置不同的话配置文件参数也不一样
一下为mysq 5.5,开启innodb,数据库目录自行替换
  1. [client]
  2. #password        = your_password
  3. port                = 3306
  4. socket                = /tmp/mysql.sock

  5. [mysqld]
  6. port                = 3306
  7. socket                = /tmp/mysql.sock
  8. datadir = 数据库目录
  9. skip-external-locking
  10. key_buffer_size = 16M
  11. max_allowed_packet = 1M
  12. table_open_cache = 64
  13. sort_buffer_size = 512K
  14. net_buffer_length = 8K
  15. read_buffer_size = 256K
  16. read_rnd_buffer_size = 512K
  17. myisam_sort_buffer_size = 8M
  18. thread_cache_size = 8
  19. query_cache_size = 8M
  20. tmp_table_size = 16M

  21. #skip-networking
  22. max_connections = 500
  23. max_connect_errors = 100
  24. open_files_limit = 65535

  25. log-bin=mysql-bin
  26. binlog_format=mixed
  27. server-id        = 1
  28. expire_logs_days = 10

  29. default_storage_engine = InnoDB
  30. innodb_file_per_table = 1
  31. innodb_data_home_dir = 数据库目录
  32. innodb_data_file_path = ibdata1:10M:autoextend
  33. innodb_log_group_home_dir = 数据库目录
  34. innodb_buffer_pool_size = 16M
  35. innodb_additional_mem_pool_size = 2M
  36. innodb_log_file_size = 5M
  37. innodb_log_buffer_size = 8M
  38. innodb_flush_log_at_trx_commit = 1
  39. innodb_lock_wait_timeout = 50

  40. [mysqldump]
  41. quick
  42. max_allowed_packet = 16M

  43. [mysql]
  44. no-auto-rehash

  45. [myisamchk]
  46. key_buffer_size = 20M
  47. sort_buffer_size = 20M
  48. read_buffer = 2M
  49. write_buffer = 2M

  50. [mysqlhotcopy]
  51. interactive-timeout
复制代码
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-8-24 16:34:25 | 显示全部楼层

感谢军哥~通过以上配置信息已经修复问题~
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-25 13:25 , Processed in 0.025532 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表