因为根目录磁盘满了,我移动数据和软件造成mysql启动不了,查原因mysql.sock不在了
今天刚接手新项目的服务器,不知道以前谁搭建的因为要备份数据库,但是发现空间不足
/根目录满的,然后我移动软件和文件
造成 mysql启动不了
root@localhost ~]# /data/mysql/bin/mysqldump--databases star -uroot -p123456 > /home/star.sql
mysqldump: Couldn't execute 'show fields from `c_help`': Got error 28 from storage engine (1030)# df -lh
Filesystem SizeUsed Avail Use% Mounted on
/dev/sda3 2.0G2.0G 0 100% /
/dev/sda5 246G 29G205G13% /data
/dev/sda1 99M 12M 82M13% /boot
tmpfs 7.9G 07.9G 0% /dev/shm
发现空间不足,也不知道谁搭建的服务器,坑死我了
root@localhost share]# mv * /data/ceshi/share/
# df -Th
Filesystem Type SizeUsed Avail Use% Mounted on
/dev/sda3 ext3 2.0G1.5G382M80% /
/dev/sda5 ext3 246G 24G209G11% /data
/dev/sda1 ext3 99M 12M 82M13% /boot
tmpfs tmpfs 7.9G 07.9G 0% /dev/shm mysql.sock不在了
# locate mysql.sock
# /data/mysql/
bin/ data/ include/ lib/ libexec/ log/ mysql-test/ share/ sql-bench/
# /data/mysql/bin/mysql start
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 没有进程
# killall mysqld
mysqld: no process killed
# ps -aux | grep mysqld
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ
root 222460.00.061196 720 pts/2 S+ 13:14 0:00 grep mysqld# more /etc/my.cnf|grep sock
socket=/var/lib/mysql/mysql.sock
# cd /var/lib/mysql/mysql.s 太奇葩了这问题
查看报错日志
1401043:00:02 /data/mysql/libexec/mysqld: Sort aborted
1401053:00:02 /data/mysql/libexec/mysqld: Sort aborted
1401063:00:01 /data/mysql/libexec/mysqld: Sort aborted
1401073:00:01 /data/mysql/libexec/mysqld: Sort aborted
140324 12:09:26 /data/mysql/libexec/mysqld: Normal shutdown
140324 12:09:26 Slave I/O thread killed while reading event
140324 12:09:26 Slave I/O thread exiting, read up to log 'mysql-bin.000013', position 54495054
140324 12:09:26 Error reading relay log event: slave SQL thread was killed
140324 12:09:44InnoDB: Starting shutdown...
140324 12:09:46InnoDB: Shutdown completed; log sequence number 0 1573472989
140324 12:09:46 /data/mysql/libexec/mysqld: Shutdown complete
# ps -ef | grep mysqld
root 22330 201310 13:24 pts/2 00:00:00 grep mysqld
# ps -ef | grep mysql
root 22332 201310 13:24 pts/2 00:00:00 grep mysql 发现
# ./
bin/ data/ include/ lib/ libexec/ log/ mysql-test/ share/ sql-bench/
# ./bin/
comp_err mysqlbinlog mysql_find_rows mysqltestmanagerc
innochecksum mysqlbug mysql_fix_extensions mysqltestmanager-pwgen
msql2mysql mysqlcheck mysql_fix_privilege_tablesmysql_tzinfo_to_sql
myisamchk mysql_client_test mysqlhotcopy mysql_upgrade
myisam_ftdump mysql_config mysqlimport mysql_upgrade_shell
myisamlog mysql_convert_table_formatmysql_install_db mysql_waitpid
myisampack mysqld_multi mysql_secure_installation mysql_zap
my_print_defaults mysqld_safe mysql_setpermission perror
mysql mysqldump mysqlshow replace
mysqlaccess mysqldumpslow mysql_tableinfo resolveip
mysqladmin mysql_explain_log mysqltest resolve_stack_dump
# ./bin/mysqld_safe &
22367
# Starting mysqld daemon with databases from /data/mysql/data
# /data/mysql/bin/mysql -uroot -p123456
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.0.88-log Source distribution
No 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
# cd /tmp/
.ICE-unix/mysql.sock
# cd /tmp/ 终于进去了
终于备份好了,为了以后不必要的麻烦,添加service管理
# cp /data/mysql/share/mysql/mysql.server /etc/init.d/mysql
# cd /etc/init.d/
# chkconfig --add mysql
# chkconfig mysql on 这样方便多了
# service mysql stop
MySQL manager or server PID file could not be found!
# service mysql start
Starting MySQL.
# /data/mysql/bin/mysql -uroot -p
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.0.88-log Source distribution
No entry for terminal type "xterm";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
终于解决了!
页:
[1]