Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)

后端 未结 30 2711
再見小時候
再見小時候 2020-11-22 04:23

I am having a big problem trying to connect to mysql. When I run:

/usr/local/mysql/bin/mysql start

I have the following error :

<         


        
30条回答
  •  萌比男神i
    2020-11-22 04:38

    I ran into this issue today. None of these answers provided the fix. I needed to do the following commands (found here https://stackoverflow.com/a/20141146/633107) for my mysql service to start:

    sudo /etc/init.d/mysql stop
    cd /var/lib/mysql/
    ls ib_logfile*
    mv ib_logfile0 ib_logfile0.bak
    mv ib_logfile1 ib_logfile1.bak
    ... etc ...
    /etc/init.d/mysql restart
    

    This was partly indicated by the following errors in /var/log/mysql/error.log:

    140319 11:58:21 InnoDB: Completed initialization of buffer pool
    InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes
    InnoDB: than specified in the .cnf file 0 5242880 bytes!
    140319 11:58:21 [ERROR] Plugin 'InnoDB' init function returned error.
    140319 11:58:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    140319 11:58:21 [ERROR] Unknown/unsupported storage engine: InnoDB
    140319 11:58:21 [ERROR] Aborting
    

    I also saw the disk full error, but only when running commands without sudo. If the permissions check fails, it reports disk full (even when your partition is not even close to full).

提交回复
热议问题