Mysql [Warning] Can't create test file

521530 次阅读 by 九九 2012-07-23 | 标签:服务器 问题

啊!!这Linux就是权限流,各种权限引发的时间消耗战,搞来搞去,找来找去,最后还是在“权限”这两个字上面找到了解法~为了让数据库文件能更加的安全,我把Mysql Database的目录指向到了Home下的一个库目录,并把此目录的所有东西都给了mysql用户,执行:

#sudo chmod mysql:mysql -R xxxx

可弄了半天,还是报着

Mysql [Warning] Can't create test file

之类的错误。我找不到解法了,一路狂Google,找到了篇Blog,如下所写:

在一篇老外的帖子中找到了大概原因,大概原因是安装了SELINUX策略后,无论APACHE或MYSQL都要更改目录的权限

如果是APACHE,方法为:

# chcon -R -h -t httpd_sys_content_t /www/web/

如果是mysql,方法为:

# chcon -R -t mysqld_db_t /mysql

啊!!重新的来

#sudo service mysqld start
mysqld start [成功]

评论(27758)

Rufus To 九九 (3天以前)

We're a group of volunteers and starting a new scheme in our community. Your site provided us with valuable information to work on. You have done an impressive job and our whole community will be thankful to you. cheap football jerseys

Chas To 九九 (3天以前)

What's up mates, how is everything, and what you desire to say about this article, in my view its genuinely amazing designed for me.cheap jerseys

кредит онлайн To 九九 (4天以前)

Кредит онлайн! http://kischu-stadt.de/redirect.php?url=https://vam-groshi.com.ua/

detente massage lyon To 九九 (5天以前)

IV Quatre vertus me semblent resumer l'enseignement moral que me donnerent, surtout par leurs exemples, les pieux directeurs qui m'entourerent de leurs soins jusqu'a l'age de vingt-trois ans: le desinteressement ou la pauvrete, la modestie, la politesse et la regle des moeurs. http://www.sophiechassat.com

Elbert To 九九 (7天以前)

Hi there! This post couldn't be written any better! Reading through this post reminds me of my previous roommate! He constantly kept preaching about this. I am going to send this information to him. Pretty sure he will have a great read. Many thanks for sharing! wholesale jerseys

Kareem To 九九 (2017-04-20)

Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how could we communicate?cheap ncaa jerseys

Kelly To 九九 (2017-04-19)

Do you have a spam issue on this website; I also am a blogger, and I was curious about your situation; we have developed some nice practices and we are looking to trade techniques with other folks, why not shoot me an email if interested.cheap nba jerseys

Noel To 九九 (2017-04-18)

Ravens 4 Sam Koch Jersey - Welcome to Cheap Nate Palmer Jerseys site - one of the best china jersey suppliers on the Internet. We specialise in the manufacture and supply of top quality cheap offer. This is a topic that's close to my heart... Best wishes! Exactly where are your contact details though?

Justin To 九九 (2017-04-18)

nba authentic jerseys australia - Wholesale Nba Christmas Jersey Sleeves Directory. You can Online custom football jerseys for women,Wholesale jersey plain,aj mccarron jersey,cheap custom jersey Asking questions are in fact fastidious thing if you are not understanding anything completely, but this article provides nice understanding yet.

massage lyon pas cher To 九九 (2017-04-17)

Froid, engourdi, j'avais une sorte de vertige: battement par battement, la vie ranima un peu mes membres abattus, jusqu'a ce qu'une crise soudaine qui, un moment, paraissait etre ma derniere convulsion, fit refluer mon sang, quoique epais et glace. http://www.sophiechassat.com

Thomas To 九九 (2017-04-17)

This is a topic that is near to my heart... Cheers! Where are your contact details though? wholesale jerseys

Dustin To 九九 (2017-04-17)

Wow, incredible blog layout! How lengthy have you been blogging for? you made running a blog look easy. The entire glance of your website is wonderful, let alone the content material! cheap nhl jerseys

Effie To 九九 (2017-04-16)

hi!,I like your writing very much! share we be in contact extra about your post on AOL? I require a specialist on this area to solve my problem. Maybe that is you! Taking a look forward to see you. cheap nfl jerseys

Cassie To 九九 (2017-04-15)

You actually make it appear so easy together with your presentation however I find this matter to be really something which I feel I might by no means understand. It sort of feels too complex and extremely huge for me. I'm looking ahead in your subsequent submit, I'll try to get the hang of it!cheap nhl jerseys

Freddie To 九九 (2017-04-15)

Its like you learn my thoughts! You seem to understand a lot approximately this, like you wrote the guide in it or something. I feel that you just can do with some % to pressure the message home a little bit, but other than that, that is fantastic blog. A great read. I will certainly be back.wholesale ncaa jerseys

Regena To 九九 (2017-04-15)

I've been browsing online greater than 3 hours lately, yet I by no means discovered any interesting article like yours. It's lovely price sufficient for me. In my opinion, if all site owners and bloggers made just right content material as you probably did, the net will likely be a lot more helpful than ever before.cheap mlb jerseys

Angus To 九九 (2017-04-14)

My brother recommended I might like this website. He was entirely right. This post truly made my day. You can not imagine just how much time I had spent for this information! Thanks!wholesale nfl jerseys

Alfonzo To 九九 (2017-04-12)

What is size of mlb jerseys cheap china may have? Know more about here - http://chicagocubs.myblog.de/

Douglas To 九九 (2017-04-11)

Excellent pieces. Keep posting such kind of info on your site. Im really impressed by your site. Hi there, You have done an incredible job. I'll certainly digg it and in my view suggest to my friends. I'm confident they will be benefited from this web site. http://www.youdrive-fm.de/?option=com_k2&view=itemlist&task=user&id=42475

Geneva To 九九 (2017-04-11)

It's an awesome piece of writing designed for all the online viewers; they will obtain benefit from it I am sure. wholesale nfl jerseys

PS:多打字可以减肥哦~234字以内。支持表情:


Top