權(quán)限問(wèn)題導(dǎo)致的MYSQL無(wú)法正常啟動(dòng)問(wèn)題的解決辦法
在安裝mysql過(guò)程中,由于對(duì)log文件目錄位置進(jìn)行了修改,
在my.cnf 中加入
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
新增log-error = /var/log/mysql/mysql_error.log
新增log-bin = /var/log/mysql/binlog
導(dǎo)致MYSQL無(wú)法正常啟動(dòng)
查看LOG后發(fā)現(xiàn)
Can't start server : Bind on unix socket: Permission denied
應(yīng)該是一個(gè)權(quán)限問(wèn)題,仔細(xì)檢查發(fā)現(xiàn) 新制定的log 文件權(quán)限不對(duì)
使用chown進(jìn)行修改 之后還是同樣錯(cuò)誤
Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
chmod 777 /tmp 就可以了
如果好不行的話,建議把整個(gè)mysql安裝目錄都改為 mysql:mysql下
chown -R mysql:mysql /usr/local/mysql
應(yīng)該就不會(huì)有權(quán)限方面的問(wèn)題了
關(guān)鍵詞:MYSQL
閱讀本文后您有什么感想? 已有 人給出評(píng)價(jià)!
- 1
- 1
- 1
- 1
- 1
- 1