There isn't much to write about recently. In the future, the articles will include more simple problem records. As long as they are problems I encounter during operation, even if they are small, I will record them so that they can be reviewed again in the future. Recently, when I was helping a friend migrate data from a VPS, I encountered a problem that the database could not be exported. Record it!
Use the command to export the database for recovery on the new VPS, command:
[email protected]zr [~]# mysqldump -u( Database username) -p (password) (database name) | gzip > blog.sql.gz
Error message:
mysqldump: Got error: 23: Out of resources when opening file ' ./zrblog_dfhghdt/pre_ucenter_settings.MYD' (Errcode: 24) when using LOCK TABLES
Please note that I already did a tutorial on the above export instructions in June last year (tutorial link), there are some If you have questions or are interested, you can check it out.
You can see that this error message appears. Through searching, we found that this problem is relatively easy to solve.
First use the ulimit -n command to check the limit on the number of open files:

[email protected]zr [~]# ulimit -n
1024

We need to adjust the value of open_files_limit in the MySQL configuration file.
mycnf
Edit my.cnf (command vi /etc/my.cnf). I don’t have open_files_limit here, so I added open_files_limit = 65536 below (this value can be set by yourself, so as not to report an error. ).
Save after completion, restart MySQL, and then try to back up using the instructions at the beginning.
OK, done.


Hong Kong/United States/Domestic High Speed ​​VPS

Tag: Out of resources when opening file

window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":["mshare","kaixin001","tsina"," tsohu","tqq","renren","qzone","weixin","bdysc","bdxc","tqf","tieba","douban","bdhome","sqq","thx" ],"bdPic":"","bdStyle":"0","bdSize":"24"},"slide":{"type":"slide","bdImg":"2","bdPos" :"left","bdTop":"100"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["tsina","tqq","tsohu","qzone","renren", "weixin","mshare"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg .share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
postid
1929

Leave a Reply