您好,欢迎访问一九零五行业门户网

因为根目录磁盘满了,我移动数据和软件造成mysql启动不了,查原因mysql.sock不在了

今天刚接手新项目的服务器,不知道以前谁搭建的因为要备份数据库,但是发现空间不足/根目录满的,然后我移动软件和文件造成mysql启动不了root@localhost~]#/data
今天刚接手新项目的服务器,不知道以前谁搭建的
因为要备份数据库,但是发现空间不足
/根目录满的,然后我移动软件和文件
造成 mysql启动不了
root@localhost ~]# /data/mysql/bin/mysqldump --databases star -uroot -p123456 > /home/star.sqlmysqldump: couldn't execute 'show fields from `c_help`': got error 28 from storage engine (1030)[root@localhost ~]# df -lhfilesystemsize used avail use% mounted on/dev/sda32.0g 2.0g0 100% //dev/sda5246g 29g 205g 13% /data/dev/sda199m 12m 82m 13% /boottmpfs7.9g0 7.9g 0% /dev/shm
发现空间不足,也不知道谁搭建的服务器,坑死我了root@localhost share]# mv * /data/ceshi/share/[root@localhost share]# df -thfilesystem type size used avail use% mounted on/dev/sda3ext3 2.0g 1.5g 382m 80% //dev/sda5ext3 246g 24g 209g 11% /data/dev/sda1ext399m 12m 82m 13% /boottmpfstmpfs 7.9g0 7.9g 0% /dev/shmmysql.sock不在了
[root@localhost tmp]# locate mysql.sock[root@localhost tmp]# /data/mysql/bin/data/include/ lib/libexec/ log/mysql-test/ share/sql-bench/[root@localhost tmp]# /data/mysql/bin/mysql starterror 2002 (hy000): can't connect to local mysql server through socket '/tmp/mysql.sock' (2)没有进程
[root@localhost tmp]# killall mysqldmysqld: no process killed
[root@localhost tmp]# ps -aux | grep mysqldwarning: bad syntax, perhaps a bogus '-'? see /usr/share/doc/procps-3.2.7/faqroot22246 0.0 0.0 61196 720 pts/2 s+ 13:14 0:00 grep mysqld[root@localhost tmp]# more /etc/my.cnf|grep socksocket=/var/lib/mysql/mysql.sock[root@localhost tmp]# cd /var/lib/mysql/mysql.s太奇葩了这问题
查看报错日志
140104 3:00:02 [error] /data/mysql/libexec/mysqld: sort aborted140105 3:00:02 [error] /data/mysql/libexec/mysqld: sort aborted140106 3:00:01 [error] /data/mysql/libexec/mysqld: sort aborted140107 3:00:01 [error] /data/mysql/libexec/mysqld: sort aborted140324 12:09:26 [note] /data/mysql/libexec/mysqld: normal shutdown140324 12:09:26 [note] slave i/o thread killed while reading event140324 12:09:26 [note] slave i/o thread exiting, read up to log 'mysql-bin.000013', position 54495054140324 12:09:26 [note] error reading relay log event: slave sql thread was killed140324 12:09:44 innodb: starting shutdown...140324 12:09:46 innodb: shutdown completed; log sequence number 0 1573472989140324 12:09:46 [note] /data/mysql/libexec/mysqld: shutdown complete
[root@localhost tmp]# ps -ef | grep mysqldroot22330 20131 0 13:24 pts/2 00:00:00 grep mysqld[root@localhost tmp]# ps -ef | grep mysqlroot22332 20131 0 13:24 pts/2 00:00:00 grep mysql发现
[root@localhost mysql]# ./bin/data/include/ lib/libexec/ log/mysql-test/ share/sql-bench/[root@localhost mysql]# ./bin/comp_errmysqlbinlogmysql_find_rowsmysqltestmanagercinnochecksummysqlbugmysql_fix_extensionsmysqltestmanager-pwgenmsql2mysqlmysqlcheckmysql_fix_privilege_tables mysql_tzinfo_to_sqlmyisamchkmysql_client_testmysqlhotcopymysql_upgrademyisam_ftdumpmysql_configmysqlimportmysql_upgrade_shellmyisamlogmysql_convert_table_format mysql_install_dbmysql_waitpidmyisampackmysqld_multimysql_secure_installation mysql_zapmy_print_defaultsmysqld_safemysql_setpermissionperrormysqlmysqldumpmysqlshowreplacemysqlaccessmysqldumpslowmysql_tableinforesolveipmysqladminmysql_explain_logmysqltestresolve_stack_dump[root@localhost mysql]# ./bin/mysqld_safe &[1] 22367[root@localhost mysql]# starting mysqld daemon with databases from /data/mysql/data[root@localhost mysql]# /data/mysql/bin/mysql -uroot -p123456welcome to the mysql monitor. commands end with ; or \g.your mysql connection id is 15server version: 5.0.88-log source distributionno entry for terminal type xterm;using dumb terminal settings.type 'help;' or '\h' for help. type '\c' to clear the current input statement.mysql> ctrl-c -- exit!aborted[root@localhost mysql]# cd /tmp/.ice-unix/ mysql.sock[root@localhost mysql]# cd /tmp/终于进去了
终于备份好了,为了以后不必要的麻烦,,添加service管理
[root@localhost data]# cp /data/mysql/share/mysql/mysql.server /etc/init.d/mysql[root@localhost data]# cd /etc/init.d/[root@localhost init.d]# chkconfig --add mysql[root@localhost init.d]# chkconfig mysql on这样方便多了
[root@localhost init.d]# service mysql stopmysql manager or server pid file could not be found![failed][root@localhost init.d]# service mysql startstarting mysql.[ ok ][root@localhost init.d]# /data/mysql/bin/mysql -uroot -pwelcome to the mysql monitor. commands end with ; or \g.your mysql connection id is 21server version: 5.0.88-log source distributionno entry for terminal type xterm;using dumb terminal settings.type 'help;' or '\h' for help. type '\c' to clear the current input statement.
终于解决了!
本文出自 “浩子的▁运维笔录ヽ” 博客,请务必保留此出处
其它类似信息

推荐信息