首頁 資料庫 mysql教程 RedHat4找不到网卡和mysql启动不了解决方案

RedHat4找不到网卡和mysql启动不了解决方案

Jun 07, 2016 pm 03:40 PM
mysql 啟動 網卡 解決方案

本文记录了一次RedHat AS release4上出现找不到网卡和mysql启动不了解决方案并解决问题的过程 0.机器环境: [root@xxhost ~]# lsb_release -a LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch Distributor ID: RedHatEnt

本文记录了一次RedHat AS release4上出现找不到网卡和mysql启动不了解决方案并解决问题的过程

0.机器环境:

[root@xxhost ~]# lsb_release -a
LSB Version:    :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description:    Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Release:        4
Codename:       NahantUpdate4

[root@xxhost ~]# mysql --version
mysql  Ver 14.14 Distrib 5.1.55, for pc-linux-gnu (i686) using  EditLine wrapper

问题描述:

1.开机不能联网,找不到网卡eth0和eth1,只能找到lo网卡

service network start:

Bringing up interface eth0: e1000 device eth0 does not seem to be present, delaying initialization.


解决方案:

 在communities.vmware.com看到一个老外说,他在遇到这个问题时说:“What I found was that my modules.dep and modules.alias were empty,which live in /lib/modules/`uname-r`/”。这让我想起了,下午我在编一个模块时,执行过depmod,这是会改变modules.dep和modules.alias。到/lib/modules/`uname-r`/一看,果然,里面只有与我的模块有关的依赖信息。看来,这是由于我以错误的方式执行了depmod命令造成的。可能是由于在向安装好的php中添加新模块的时候编译了openssl和curl,而这个过程有可能改变了modules.dep

 看来是系统模块的依赖关系信息丢失了,启动时网卡驱动等模块无法加载。所以,如果想用modprobe向系统加自己的模块时,应将your_module.ko拷入/lib/modules/`uname -r`/,然后depmod -a 。最后,modprobyour_module。

在/lib/modules/内核版本号/ 执行depmod 重新生成modules.dep和modules.alias

http://blog.chinaunix.net/uid-20750677-id-1878255.html


2.Mysql启动不了

2.1Starting MySQL.Manager of pid-file quit without updating file.[FAILED]mysql

查看错误日志
默认的mysql错误日志是在/usr/local/mysql/data 下面 more ****.err 有下面的信息
090302 02:27:26 mysqld_safe mysqld from pid file /opt/mysql/web2.pid ended
090302 02:30:03 mysqld_safe Starting mysqld daemon with databases from /opt/mysql
090302 2:30:03 [ERROR] /usr/local/mysql/libexec/mysqld: unknown option'--skip-federated'
090302 2:30:03 [ERROR] Aborting
解决方法:
只要将/etc/my.cnf里面的 skip federated注释掉即可。


http://www.dedecms.com/knowledge/data-base/mysql/2012/1122/16854.html


2.2

mysql不能启动 Manager of pid-file quit without updating file


启动mysql失败,提示Manager of pid-file quit without updating file.错误。从网上直接搜索错误信息,感觉出错原因及解决方案都不适用于本机的情况。

本着出错要查出其原因的原则,查看了mysql的出错日志(出错日志所在路径,请根据您自己机子的实际情况查找),发现错误信息:File ‘./mysql-bin.index’ not found (Errcode: 13),查看数据库文件,mysql-bin.index确实存在。

查看数据库文件的权限,发现全都变成了 drwx—— 2 1001 1001。突然想起之前重建过mysql用户,造成数据库文件的权限用户信息丢失。重新授权即可。

网上有不少这个原因的解释,但是都不是我想说的。我要说的原因其实很白痴:data/mysql-bin.index没有删除,data/mysql-bin.index是存放日志文件索引的文件,只删除了日志文件而没有对日志的索引文件做处理显然是不行的。


http://www.jb51.net/article/22052.htm


sudo chown -R  mysql var/
sudo chgrp -R  mysql var/
http://www.gagahappy.com/mysql-manager-of-pid-file-quit-without-updating-file/

 


http://bbs.chinaunix.net/thread-1272674-1-1.html


2.3 errcode 122 waiting for someone to free sapce

Running Centos 6.5

We have been getting these errors for a few days when mysql tries to write to the datafiles in /var/lib/mysql tree. The file names vary. There is 120Gb free in the root partion. Every thing is in root.

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_myserver-lv_root 150245636 14936520 127681188 11% /
tmpfs 4030892 0 4030892 0% /dev/shm
/dev/sda1 495844 116407 353837 25% /boot

140506 16:11:28 [Warning] Disk is full writing './george_wpress/ella_commentmeta.TMD' (Errcode: 122). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space)

As a test I ( using dd command ) created a 5G testfile in the /var/directory without problem.

The total size of the mysql directory is around 500Mb


The fault was resovled by switching off the quota mechanism using the
quotaoff command


http://forums.mysql.com/read.php?20,613809,613852#msg-613852


2.4 MySQL is running but PID file is not found


今天vps访问速度很慢,我用/root/lnmp restart 命令给lnmp重启了一下,重启之后发觉mysql链接不上了。 ssh里面运行 service mysql restrat 出现 MySQL is running but PID file could not be found 错误。

用mysql -u root -p 命令运行mysql时出现 Can't connect to MySQL through socket mysql.sock 错误。

后来网上找到一篇不错的文章 mysql PID file not found and Can't connect to MySQL through socket mysql.sock虽然后来我是直接重启vps(reboot)解决这个问题,不过上面文章里的很多内容还是挺有用的。

 

记录几个以前不知道的知识:

1、grep 是查找命令 可做文件内的字符串查找,使用如: ps aux | grep mysql

2、ps 命令 显示所有进程 跟windows系统的 tasklist 命令相似 aux 显示所有包含其他使用者的行程 比如我运行 ps aux | grep mysql 命令后能够找到

–datadir=/usr/local/mysql/var–pid-file=/usr/local/mysql/var/li220-124.pid

3、kill -9 [PID] 终止进程命令 通过ps 找到进程pid 然后用kill -9 [PID]终止进程(-9表示强迫进程立即停止)

4、hostname 命令显示当前主机名 uname -a 命令显示当前系统内核版本

5、service命令

通过 service mysql status 可以查看 mysql的状态。但是其他服务名称如何查找?

发现通过 ls /etc/init.d/ 目录下面可以找到各个服务名称。

6、top命令 查看内存和cup使用情况

7、chown 更改属主和属主组

chown [OPTION]… [OWNER][:[GROUP]] FILE…

如:chown mysql:mysql redhat.pid 更改redhat.pid 的ownner为mysql 所属组为mysql
2.5 MySQL: mysql is not running but lock exists

A MySQL crash on Red Hat system resulted with:

/etc/init.d/mysql status


coming back with:

mysql is not running but lock exists


Solved by removing the lock file:

rm /var/lock/subsys/mysql


If this happens again it may also be necessary to remove the pid file from /var/lib/mysql
2.6
MySQL: write failed, user block limit reached

this mean that you don't have enouph space to create this backup file. check your qouta and file size


http://www.experts-exchange.com/Database/MySQL/Q_24895505.html


2.7
 sda5: write failed, user block limit reached

http://forums.cpanel.net/f5/sda5-write-failed-user-block-limit-reached-49435.html

1.


da5: write failed, user block limit reached ???


sda5 : write failed, user block limit reached ???

--------------------------------------------------------------------------------

I got write failed, user block limit reached in my server shell ....
I can not start apache and mysql because if I do that server load average goes up ti 100! in seconds..!!  

Already runed /scripts/fixquotas but the problem stills.

sda5 is 50% free space....

I use RH4.


Last edited by sh4ka; 01-31-2006 at 06:05 PM.



Reply With QuoteReply With Quote

2.

01-31-2006, 06:14 PM


nyjimbo nyjimbo is offline

Registered Member


nyjimbo's Avatar
Join DateJan 2003LocationNew YorkPosts1,123



Default


did you try to google or yahoo search:

write failed, user block limit reached

Sounds like you ran out of some kind of room either due to quotas or some other limits.

Is this a virtual server ?


"A dog has raised it’s hind leg on the age of nevermore !"
-- Rolf



Reply With QuoteReply With Quote

3.

01-31-2006, 06:22 PM


sh4ka sh4ka is offline

Registered Member


sh4ka's Avatar
Join DateMay 2005Posts435



Default


Yes is a virtual server...
I already searched google and know the problem is with the disk quota maybe it was bad configured at the setup.. I really don't know, that's why I am asking.

On sda5 I have the / partition... including home, and the system directories. /tmp /boot are the other partitions..

root@server [~]# quota
Disk quotas for user root (uid 0): none

root@server [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 71G 35G 32G 53% /
/dev/sda1 99M 11M 83M 12% /boot
/dev/sda3 1012M 36M 925M 4% /tmp
none 506M 0 506M 0% /dev/shm
/dev/sdb1 74G 20G 50G 29% /backup/cpbackup

Also the fstab is well configured for this partition:

root@server [~]# cat /etc/fstab
/dev/sda5 / ext3 defaults,usrquota 1 1

Any ideas, pleaseeeee ?

thkz!




Reply With QuoteReply With Quote

4.

02-01-2006, 01:48 AM


madaboutlinux madaboutlinux is offline

Registered Member


Join DateJan 2005LocationEarthPosts1,052



Default


If its a VPS, the hosting company do set a Quota limit for each VPS on the main VPS server. There are Disk quotas set for each VPS to control the number of inodes a vps can use. You will have to ask your hosting company to change the quota limit for you. It seems you have reached your Hard limit. You will not be able to sort this issue at your end.

Hope this will sort out your issue.


Linux WebHosting Blog.
http://linuxhostingsupport.net/blog/
MSN :: madaboutlinux@hotmail.com



Reply With QuoteReply With Quote

5.

02-01-2006, 05:32 AM


xerophyte xerophyte is offline

Registered Member


Join DateMar 2003LocationCanadaPosts217



Default


That error happens when you are over the quota, and you try to write to the disk.

In your case looks like one (many) of your hosted site over the quota, and when they try to write to the disk you get that error. Check site(s) which are over the quota.

hope that helps

相关信息截图:

1.mysql log

RedHat4找不到网卡和mysql启动不了解决方案

2.查看 mysql进程

RedHat4找不到网卡和mysql启动不了解决方案

3.mysql失败

RedHat4找不到网卡和mysql启动不了解决方案

4.mysql版本

RedHat4找不到网卡和mysql启动不了解决方案


5.RedHat版本


RedHat4找不到网卡和mysql启动不了解决方案

6.ulimit设置
RedHat4找不到网卡和mysql启动不了解决方案

本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

Video Face Swap

Video Face Swap

使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

<🎜>:泡泡膠模擬器無窮大 - 如何獲取和使用皇家鑰匙
3 週前 By 尊渡假赌尊渡假赌尊渡假赌
北端:融合系統,解釋
3 週前 By 尊渡假赌尊渡假赌尊渡假赌

熱工具

記事本++7.3.1

記事本++7.3.1

好用且免費的程式碼編輯器

SublimeText3漢化版

SublimeText3漢化版

中文版,非常好用

禪工作室 13.0.1

禪工作室 13.0.1

強大的PHP整合開發環境

Dreamweaver CS6

Dreamweaver CS6

視覺化網頁開發工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

熱門話題

Java教學
1664
14
CakePHP 教程
1423
52
Laravel 教程
1321
25
PHP教程
1269
29
C# 教程
1249
24
MySQL的角色:Web應用程序中的數據庫 MySQL的角色:Web應用程序中的數據庫 Apr 17, 2025 am 12:23 AM

MySQL在Web應用中的主要作用是存儲和管理數據。 1.MySQL高效處理用戶信息、產品目錄和交易記錄等數據。 2.通過SQL查詢,開發者能從數據庫提取信息生成動態內容。 3.MySQL基於客戶端-服務器模型工作,確保查詢速度可接受。

laravel入門實例 laravel入門實例 Apr 18, 2025 pm 12:45 PM

Laravel 是一款 PHP 框架,用於輕鬆構建 Web 應用程序。它提供一系列強大的功能,包括:安裝: 使用 Composer 全局安裝 Laravel CLI,並在項目目錄中創建應用程序。路由: 在 routes/web.php 中定義 URL 和處理函數之間的關係。視圖: 在 resources/views 中創建視圖以呈現應用程序的界面。數據庫集成: 提供與 MySQL 等數據庫的開箱即用集成,並使用遷移來創建和修改表。模型和控制器: 模型表示數據庫實體,控制器處理 HTTP 請求。

MySQL和PhpMyAdmin:核心功能和功能 MySQL和PhpMyAdmin:核心功能和功能 Apr 22, 2025 am 12:12 AM

MySQL和phpMyAdmin是強大的數據庫管理工具。 1)MySQL用於創建數據庫和表、執行DML和SQL查詢。 2)phpMyAdmin提供直觀界面進行數據庫管理、表結構管理、數據操作和用戶權限管理。

MySQL與其他編程語言:一種比較 MySQL與其他編程語言:一種比較 Apr 19, 2025 am 12:22 AM

MySQL与其他编程语言相比,主要用于存储和管理数据,而其他语言如Python、Java、C 则用于逻辑处理和应用开发。MySQL以其高性能、可扩展性和跨平台支持著称,适合数据管理需求,而其他语言在各自领域如数据分析、企业应用和系统编程中各有优势。

解決數據庫連接問題:使用minii/db庫的實際案例 解決數據庫連接問題:使用minii/db庫的實際案例 Apr 18, 2025 am 07:09 AM

在開發一個小型應用時,我遇到了一個棘手的問題:需要快速集成一個輕量級的數據庫操作庫。嘗試了多個庫後,我發現它們要么功能過多,要么兼容性不佳。最終,我找到了minii/db,這是一個基於Yii2的簡化版本,完美地解決了我的問題。

laravel框架安裝方法 laravel框架安裝方法 Apr 18, 2025 pm 12:54 PM

文章摘要:本文提供了詳細分步說明,指導讀者如何輕鬆安裝 Laravel 框架。 Laravel 是一個功能強大的 PHP 框架,它 упростил 和加快了 web 應用程序的開發過程。本教程涵蓋了從系統要求到配置數據庫和設置路由等各個方面的安裝過程。通過遵循這些步驟,讀者可以快速高效地為他們的 Laravel 項目打下堅實的基礎。

初學者的MySQL:開始數據庫管理 初學者的MySQL:開始數據庫管理 Apr 18, 2025 am 12:10 AM

MySQL的基本操作包括創建數據庫、表格,及使用SQL進行數據的CRUD操作。 1.創建數據庫:CREATEDATABASEmy_first_db;2.創建表格:CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY,titleVARCHAR(100)NOTNULL,authorVARCHAR(100)NOTNULL,published_yearINT);3.插入數據:INSERTINTObooks(title,author,published_year)VA

解決MySQL模式問題:TheliaMySQLModesChecker模塊的使用體驗 解決MySQL模式問題:TheliaMySQLModesChecker模塊的使用體驗 Apr 18, 2025 am 08:42 AM

在使用Thelia開發電商網站時,我遇到了一個棘手的問題:MySQL模式設置不當,導致某些功能無法正常運行。經過一番探索,我找到了一個名為TheliaMySQLModesChecker的模塊,它能夠自動修復Thelia所需的MySQL模式,徹底解決了我的困擾。

See all articles