Mysql [Warning] Can't create test file

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

评论(27949)

produits minceur To 九九 (2019-01-16)

Wow because this is excellent work! Congrats and keep it up. http://classement-des-tablettes-pour-maigrir.eu/

remedios para crecer el pelo To 九九 (2019-01-09)

Particularly interesting....looking forwards to visiting again. http://remedioscaidacabelloo.ovh/

izshxz To 九九 (2018-12-04)

cuanto vale el generico de la viagra <a href=http://camadian-pharmacya.com>order viagra online usa</a>

Brianraf To 九九 (2018-11-27)

<a href=http://totalworldstore.com/shop/go.php?sid=1> <u><b>>>> Want to buy with Discount? CLICK HERE! <<<</b></u> </a> RELATED SEARCHES: http://www.full-colour.de/index.php/forum/welcome-mat/770-licensed-pharmacy-phenazopyridine-without-rx-next-day-delivery-cheapest-prices-no-prescription-fast-delivery#774 http://www.smart-gaming.co.uk/index.php?/topic/64909-cheap-price-permethrin-n

qasLax To 九九 (2018-11-24)

hello all users. i am quas wenkis from mali.

Mildredblalk To 九九 (2018-10-24)

<b>Агент Джонни Инглиш 3.0 фильм онлайн 2018 j e e</b> <a href=http://qxj.pw/58962><img src="http://i89.fastpic.ru/big/2018/1004/f6/dc86f4f120ac48291148d15a431270f6.jpg"></a> <a href=http://qxj.pw/58962><b>Смотреть фильм Агент Джонни Инглиш 3.0</b></a> <a href=http://qxj.pw/58962><b><font color=red>Смотреть фильм Агент Джонни Инглиш 3.0</font></b></a> <a href=http://qxj.pw/58962&

mxsjqk To 九九 (2018-10-11)

<a href=http://cialisn.com>liquid cialis</a> comprare cialis online in contrassegno http://cialisn.com

ezdgef To 九九 (2018-10-03)

<a href=http://canadian-pharmacyon.com>viagra without prescription</a> buy viagra online legally http://canadian-pharmacyon.com

wvvkgz To 九九 (2018-09-28)

<a href=http://canadian-pharmasy.com>order cialis 5mg</a> cialis trial http://canadian-pharmasy.com

Herbertson To 九九 (2018-09-15)

GET FREE AMAZON CODES from: --- ***JETZT!!! Amazon Gift Codes KOSTENLOS 2018 PREMIUM *** --- <b><a href=https://www.dafont.com/profile.php?user=1084108>AMAZON GIFT CARD DISCOUNT</a></b> or <b><a href=https://www.dafont.com/profile.php?user=1084108>AMAZON GIFT CODE</a></b> <b>Keywords:</b> AMAZON GIFT GENERATOR FREE GIFT CARDS AMAZON GIFT CARD CODE FREE AMAZON GIFT CARD AMAZON GIFT CARD GENERATOR GIFT CARD GENERATOR

Steevefek To 九九 (2018-08-19)

cialis coupon printable 2014 <a href="http://cialis-nice.com">cialis without a doctor's prescription</a> licorice coughing liquid buy cialis <a href=http://cialis-nice.com#cialis+professional+online+mail-order+pharmacies>buy cheap cialis online</a>

Steevefek To 九九 (2018-08-18)

cialis 5 mg vs 20mg <a href="http://cialis-nice.com">cialis pills</a> cialis pharmacy price <a href=http://cialis-nice.com#generic+cialis+tadalafil>cialis coupons 2018</a>

Robertvow To 九九 (2018-08-13)

Hello

SamuelgoR To 九九 (2018-08-04)

Truly all kinds of valuable knowledge! cialis commercial actors 2014 jeep <a href="https://cialisrxt.com/#">cbeebies cialis canada</a> p4265 5mg cialis <a href=https://cialisrxt.com/#>buy cialis online</a>

Loustexy To 九九 (2018-06-13)

Hello. And Bye.

Anthonymip To 九九 (2018-05-20)

generic cialis online 111111ZZZ https://111111ZZZ.com

erectile dysfunction To 九九 (2018-04-29)

erectile pills

levitra 20 mg To 九九 (2018-04-24)

Amazing! Its genuinely amazing paragraph, I have got much clear idea regarding from this paragraph.

Markfek To 九九 (2018-04-21)

levitra side effects vision appraisal <a href="http://mylevitraok.com">levitra 10 mg prezzo</a> absoulutely i just levitra like say site that web <a href=http://levitra-gg.com#buy+levitra>vardenafil 20mg</a>

Markfek To 九九 (2018-04-20)

qual melhor remedio cialis ou levitra for women <a href="http://myvardenafilok.com">levitra generic</a> risperodol interactions with cialis viagra levitra <a href=http://mylevitraok.com#buy+levitra>levitra 20 mg</a>

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


Top