mysql启动问题,ERROR 2002 (HY000): Can't connect to local MySQL server through socket

huo_shuai163 2011-10-01 01:01:45
由于mysql的连接数过多,重启mysql服务后,导致的问题。。。
如下所示:
[root@radius ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@radius ~]# /etc/rc.d/init.d/mysqld status
mysqld (pid 3789) 正在运行...

---
从网上找了很多资料都解决不了问题
mysql_install_db---不起作用
mysqld_safe ---同样不起作用
权限设置也试过了不管用

------【启动守护进程时报错】-----
[root@radius mysqld]# service mysqld start
初始化 MySQL 数据库: Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h radius password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[确定]
Timeout error occurred trying to start MySQL Daemon.
启动 MySQL: [失败]

---------【错误日志】------
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
111001 12:49:05 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
111001 12:49:05 InnoDB: Error: Write to file ./ibdata1 failed at offset 0 0.
InnoDB: 1048576 bytes should have been written, only -1 were written.
InnoDB: Operating system error number 28.
InnoDB: Check that your OS and file system support files of this size.
InnoDB: Check also that the disk is not full or a disk quota exceeded.
InnoDB: Error number 28 means 'No space left on device'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.0/en/operating-system-error-codes.html
InnoDB: Error in creating ./ibdata1: probably out of disk space
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
^G/usr/libexec/mysqld: Disk is full writing './mysql-bin.000004' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
^G/usr/libexec/mysqld: Disk is full writing './mysql-bin.000003' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
111001 12:54:45 mysqld started
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
^G/usr/libexec/mysqld: Disk is full writing './mysql-bin.000005' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
^G/usr/libexec/mysqld: Disk is full writing './mysql-bin.000005' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs


----------------------------
很急。。。。

望各位大虾鼎力相助。。。

...全文
2889 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
rucypli 2011-10-01
  • 打赏
  • 举报
回复
如果你想通过socket连接
则你需要重启mysql 让它自己socket
rucypli 2011-10-01
  • 打赏
  • 举报
回复
那就不要通过socket连接数据库


直接通过ip连数据库

mysql -h127.0.0.1 -uroot -pxxx
ACMAIN_CHM 2011-10-01
  • 打赏
  • 举报
回复
111001 12:49:05 InnoDB: Error: Write to file ./ibdata1 failed at offset 0 0.

检查一下是否有权限。 或者把对应目录设置为 777

56,687

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧