Recently, I've started getting this error when trying to login to mysql:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
I read on another threat that this can be caused by system getting out of date so I ran all the system updates but that did not work. So I moved onto a restart of mysql might work so I tried this but ran into permissions issues:
service mysqld restart Stopping mysqld: [ OK ] touch: cannot touch ‘/var/log/mysqld.log’: Permission denied chown: changing ownership of ‘/var/log/mysqld.log’: Operation not permitted chmod: changing permissions of ‘/var/log/mysqld.log’: Operation not permitted chown: changing ownership of ‘/var/lib/mysql’: Operation not permitted chmod: changing permissions of ‘/var/lib/mysql’: Operation not permitted MySQL Daemon failed to start. Starting mysqld: [FAILED]
I changed permissions on mysqld.log to 644 but still get the same error. And on review of the log file I also don't understand what might be causing the issue. Here is contents of mysqld.log file:
130427 21:48:58 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 130427 21:48:58 [Note] Plugin 'FEDERATED' is disabled. 130427 21:48:58 InnoDB: The InnoDB memory heap is disabled 130427 21:48:58 InnoDB: Mutexes and rw_locks use GCC atomic builtins 130427 21:48:58 InnoDB: Compressed tables use zlib 1.2.5 130427 21:48:58 InnoDB: Using Linux native AIO 130427 21:48:59 InnoDB: Initializing buffer pool, size = 128.0M 130427 21:48:59 InnoDB: Completed initialization of buffer pool InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 130427 21:48:59 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 130427 21:48:59 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 130427 21:48:59 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: 127 rollback segment(s) active. InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 130427 21:49:00 InnoDB: Waiting for the background threads to start 130427 21:49:01 InnoDB: 5.5.31 started; log sequence number 0 130427 21:49:01 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 130427 21:49:01 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 130427 21:49:01 [Note] Server socket created on IP: '0.0.0.0'. 130427 21:49:01 [Note] Event Scheduler: Loaded 0 events 130427 21:49:01 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.5.31' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
If anyone could point me in the right direction I would greatly appreciate it! Thanks.