Mysql [Warning] Can't create test file

513407 次阅读 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 [成功]

评论(27672)

Damian To 九九 (20小时以前)

Oh my goodness! Awesome article dude! Many thanks, However I am encountering difficulties with your RSS. I don't understand why I cannot subscribe to it. Is there anyone else having identical RSS problems? Anyone who knows the answer can you kindly respond? Thanx!!cheap nhl jerseys

Odessa To 九九 (2天以前)

Hello, i think that i noticed you visited my web site so i came to return the want?.I am trying to in finding things to enhance my site!I guess its good enough to use some of your ideas!!cheap jerseys

Trena To 九九 (3天以前)

Hmm it appears like your blog ate my first comment (it was super long) so I guess I'll just sum it up what I submitted and say, I'm thoroughly enjoying your blog. I too am an aspiring blog writer but I'm still new to the whole thing. Do you have any suggestions for inexperienced blog writers? I'd definitely appreciate it. 2792

Elouise To 九九 (4天以前)

I don't know if it's just me or if everyone else encountering issues with your website. It appears as if some of the written text within your content are running off the screen. Can somebody else please comment and let me know if this is happening to them as well? This might be a issue with my web browser because I've had this happen previously. Cheerswholesale nba jerseys free shipping from China

Adela To 九九 (4天以前)

It's a shame you don't have a donate button! I'd without a doubt donate to this excellent blog! I guess for now i'll settle for book-marking and adding your RSS feed to my Google account. I look forward to fresh updates and will share this blog with my Facebook group. Chat soon!cheap jerseys

Eugenio To 九九 (4天以前)

Hi there to every , because I am genuinely keen of reading this website's post to be updated daily. It consists of pleasant data.cheap jerseys

Gretchen To 九九 (4天以前)

Your style is so unique compared to other people I've read stuff from. I appreciate you for posting when you've got the opportunity, Guess I will just bookmark this blog. wholesale mlb jerseys

fans.kuanrf.com To 九九 (5天以前)

http://fans.kuanrf.com:80/home.php?mod=space&uid=1573931&do=profile&from=space

Danae To 九九 (5天以前)

When is sales for wholesale jerseys? Find site: wholesale mlb jerseys

Theresa To 九九 (6天以前)

I used to be suggested this web site by my cousin. I am now not certain whether this post is written by him as no one else know such targeted about my trouble. You are amazing! Thank you!wholesale soccer jerseys free shipping from China

Franklyn To 九九 (2017-02-11)

I don't even know how I ended up here, but I thought this post was great. I do not know who you are but definitely you're going to a famous blogger if you aren't already ;) Cheers! cheap nfl jerseys

Shelly To 九九 (2017-02-09)

Hi! This is my 1st comment here so I just wanted to give a quick shout out and say I genuinely enjoy reading your posts. Can you recommend any other blogs/websites/forums that go over the same subjects? Thank you so much! cheap mlb jerseys

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


Top