首先我要说我是一个mysql新手.基本上mysql没有启动并说:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
Run Code Online (Sandbox Code Playgroud)
现在,以下是我毁掉一切的步骤:
由于无法登录我的系统(otrs),我认为恢复较旧的备份会有所帮助.
在恢复过程中,备份管理器说我需要删除旧的数据库.我尝试了但是过程没有完成,所以我取消了它.
在此之后我试图重新启动系统,但是这有很大的问题但是当我完成重启后我试图运行mysql但它说它找不到mysql.socket.
在这一点上,我认为重新安装mysql会更好,但这样做没有用.当试图启动mysqld作为mysql用户时,它说:
[ERROR] Found 1 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover switch to commit or rollback pending transactions.
Run Code Online (Sandbox Code Playgroud)
尝试两者都没有帮助:
mysql:/root> /usr/sbin/mysqld --tc-heuristic-recover commit
131213 16:46:00 InnoDB: The InnoDB memory heap is disabled
131213 16:46:00 …Run Code Online (Sandbox Code Playgroud)