MySQL max open files limit 限制设置
Tofloor
poster avatar
呆了个呆
deepin
2016-01-16 02:09
Author
本帖最后由 w113124 于 2016-1-15 21:59 编辑

国内找不到解决办法,在外面找到个有效的:http://unix.stackexchange.com/questions/152186/mysql-max-open-files-more-than-1024#answer-157910

Edit /etc/security/limits.conf and add the following lines
  1. mysql soft nofile 65535
  2. mysql hard nofile 65535
Copy the Code

then reboot.
Then edit /usr/lib/systemd/system/mysqld.service or /usr/lib/systemd/system/mariadb.service and add
deepin 的路径是:/lib/systemd/system/mysql.service
  1. LimitNOFILE=infinity
  2. LimitMEMLOCK=infinity
Copy the Code

Then restart the db service:
  1. systemctl daemon-reload
  2. systemctl reload mariadb.service
Copy the Code

什么玩意儿啊,代码第二行老是丢失
Reply Favorite View the author
All Replies
avatar
呆了个呆
deepin
2016-01-16 02:17
#1
配置文件里有table_cache这个参数,只不过是被注释的,启用就这个错误了。我debian服务器都没问题。。。
[ERROR] /usr/sbin/mysqld: unknown variable 'table_cache=512'
Reply View the author
avatar
yutent
deepin
2016-01-16 02:58
#2
It has been deleted!
avatar
stardust
deepin
2016-01-16 05:25
#3
服务器开发非得在桌面发行版上折腾,自己找罪受么。建议虚拟机安装个不带界面的发行版,ssh过去,系统折弄坏了也好恢复
Reply View the author
avatar
呆了个呆
deepin
2016-01-16 05:46
#4
https://bbs.deepin.org/post/36133
服务器开发非得在桌面发行版上折腾,自己找罪受么。建议虚拟机安装个不带界面的发行版,ssh过去,系统折弄 ...

你这是什么话,我给本地测试环境用桌面也碍着你了?
Reply View the author
avatar
呆了个呆
deepin
2016-01-16 05:47
#5
https://bbs.deepin.org/post/36133
表示我的mysql没问题

文件限制是 1024,表少不会有问题,表多就不行了。。。
Reply View the author
avatar
stardust
deepin
2016-01-16 19:59
#6
https://bbs.deepin.org/post/36133
你这是什么话,我给本地测试环境用桌面也碍着你了?

Windows、OSX和Ubuntu都区分了服务器和桌面版,Deepin是桌面版,对服务器开发得支持自然会差些。所以建议你用虚拟机,遇到问题随便搜下一般都有解决方案。
既然你来提问,我给了个自认为中肯的回复,和碍着我有啥关系
Reply View the author
avatar
呆了个呆
deepin
2016-01-16 21:20
#7
https://bbs.deepin.org/post/36133
Windows、OSX和Ubuntu都区分了服务器和桌面版,Deepin是桌面版,对服务器开发得支持自然会差些。所以建议 ...

算了,也没什么,只是你的回答不太负责。照你这么说,我何必要用 deepin,直接用 windows + 虚拟机就得了不是。。。你说你的问题是不是不负责?
Reply View the author
avatar
deepin
deepin
2016-01-16 22:37
#8
深度的服务器版本今年上半年会对外正式发布
Reply View the author
avatar
stardust
deepin
2016-01-17 04:27
#9
https://bbs.deepin.org/post/36133
算了,也没什么,只是你的回答不太负责。照你这么说,我何必要用 deepin,直接用 windows + 虚拟机就得了 ...

你没get到我说的重点,不论你用windows(说得好像win下就没有Mysql似的)、lInux还是OSX桌面系统,我都不推荐你在上面折腾服务器环境得东西,因为人家压根不是为这个目的设计得,就算这个问题解决了,以后还会遇到其他莫名其妙得问题。
另外,用Linux桌面得原因很多,比如终端很强大,连接到服务器也比win下爽多了
不再回复了,你要用桌面发行版来折腾也没啥,我终究只是提供一个建议罢了
Reply View the author
avatar
stardust
deepin
2016-01-17 04:29
#10
https://bbs.deepin.org/post/36133
深度的服务器版本今年上半年会对外正式发布

和其他发行版比有什么特色么?毕竟深度最大的特色是桌面
Reply View the author