mysql 启动错误(InnoDB: Operating system error number 13 )
service mysqld status 可以看mysqld状态
service mysqld start 可以启动mysql
出现启动错误可以查看/var/log/mysqld.log
如果错误信息如下13112400:00:43mysqld started
1311240:00:43InnoDB:Operatingsystem error number13ina file operation.
InnoDB:Theerror means mysqld doesnothave the access rights to
InnoDB:the directory.
InnoDB:Filename/var/lib/mysql/innodb/ibdata1
InnoDB:Fileoperation call:'create'.
InnoDB:Cannotcontinueoperation.
13112400:00:43mysqld ended
错误13说明没有权限.使用命令
chmod -R 777 /var 可以解决
提示一下:这个error number 就是系统的错误号,也是程序里的errorno
附上linux的 错误码信息
errno.00 is: Success 成功
errno.01 is: Operation not permitted 不允许此类操作
errno.02 is: No such file or directory 没有此文件或目录
errno.03 is: No such process 没有此进程
errno.04 is: Interrupted system call 中断系统调用
errno.05 is: Input/output error 输入输出错误
errno.06 is: No such device or address 没有此设备或地址
errno.07 is: Argument list too long 参数过长
errno.08 is: Exec format error 执行格式错误
errno.09 is: Bad file descriptor 无效的文件描述符
errno.10 is: No child processes 不存在子进程
errno.11 is: Resource temporarily unavailable 资源暂时不可用
errno.12 is: Cannot allocate memory 分配内存失败
errno.13 is: Permission denied 权限错误
errno.14 is: Bad address 地址错误
errno.15 is: Block device required 块设备请求
errno.16 is: Device or resource busy 设备或资源忙
errno.17 is: File exists 文件已经存在
errno.18 is: Invalid cross-device link 无效的交叉连接设备
errno.19 is: No such device 没有此设备
errno.20 is: Not a directory 不是一个目录
errno.21 is: Is a directory 是一个目录
errno.22 is: Invalid argument 参数非法
errno.23 is: Too many open files in system 系统打开文件太多
errno.24 is: Too many open files 打开文件太多
errno.25 is: Inappropriate ioctl for device 设备部支持该操作
errno.26 is: Text file busy 文本文件忙
errno.27 is: File too large 文件太大
errno.28 is: No space left on device 设备没有空间,一般为存储设备
errno.29 is: Illegal seek 非法的seek操作
errno.30 is: Read-only file system 只读文件系统
errno.31 is: Too many links 太多连接
errno.32 is: Broken pipe 管道破裂
errno.33 is: Numerical argument out of domain 数值参数超出取值范围
errno.34 is: Numerical result out of range 数值结果超出取值范围
errno.35 is: Resource deadlock avoided 资源死锁
errno.36 is: File name too long 文件名太长
errno.37 is: No locks available 没有可用的锁
errno.38 is: Function not implemented 函数没有执行
errno.39 is: Directory not empty 目录非空
errno.40 is: Too many levels of symbolic links 太多级符号连接
errno.41 is: Unknown error 41 41未知错误
errno.42 is: No message of desired type 不被接受的消息类型
errno.43 is: Identifier removed 标识符已被删除errno.44is:Channelnumberoutof range...
errno.45is:Level2notsynchronized
errno.46is:Level3halted
errno.47is:Level3reset
errno.48is:Linknumberoutof range
errno.49is:Protocoldrivernotattached
errno.50is:NoCSI structure available
errno.51is:Level2halted
errno.52is:Invalidexchange
errno.53is:Invalidrequest descriptor
errno.54is:Exchangefull
errno.55is:Noanode
errno.56is:Invalidrequest code
errno.57is:Invalidslot
errno.58is:Unknownerror58
errno.59is:Badfont file format
errno.60is:Devicenota stream
errno.61is:Nodata available
errno.62is:Timerexpired
errno.63is:Outof streams resources
errno.64is:Machineisnoton the network
errno.65is:Packagenotinstalled
errno.66is:Objectisremote
errno.67is:Linkhas been severed
errno.68is:Advertiseerror
errno.69is:Srmounterror
errno.70is:Communicationerror on send
errno.71is:Protocolerror
errno.72is:Multihopattempted
errno.73is:RFS specific error
errno.74is:Badmessage
errno.75is:Valuetoo largefordefineddata type
errno.76is:Namenotunique on network
errno.77is:Filedescriptorinbad state
errno.78is:Remoteaddress changed
errno.79is:Cannotaccess a needed shared library
errno.80is:Accessinga corrupted shared library
errno.81is:.lib secionina.outcorrupted
errno.82is:Attemptingto linkintoo many shared libraries
errno.83is:Cannotexeca shared library directly
errno.84is:Invalidorincomplete multibyteorwide character
errno.85is:Interruptedsystem call should be restarted
errno.86is:Streamspipe error
errno.87is:Toomany users
errno.88is:Socketoperation on non-socket
errno.89is:Destinationaddress required
errno.90is:Messagetoolong
errno.91is:Protocolwrong typeforsocket
errno.92is:Protocolnotavailable
errno.93is:Protocolnotsupported
errno.94is:Sockettypenotsupported
errno.95is:Operationnotsupported
errno.96is:Protocolfamilynotsupported
errno.97is:Addressfamilynotsupportedbyprotocol
errno.98is:Addressalreadyinuse
errno.99is:Cannotassign requested address
errno.100is:Networkisdown
errno.101is:Networkisunreachable
errno.102is:Networkdropped connection on reset
errno.103is:Softwarecaused connection abort
errno.104is:Connectionresetbypeer
errno.105is:Nobuffer space available
errno.106is:Transportendpointisalready connected
errno.107is:Transportendpointisnotconnected
errno.108is:Cannotsend after transport endpoint shutdown
errno.109is:Toomany references:cannot splice
errno.110is:Connectiontimedout
errno.111is:Connectionrefused
errno.112is:Hostisdown
errno.113is:Noroute to host
errno.114is:Operationalreadyinprogress
errno.115is:Operationnowinprogress
errno.116is:StaleNFS file handle
errno.117is:Structureneeds cleaning
errno.118is:Nota XENIX named type file
errno.119is:NoXENIX semaphores available
errno.120is:Isa named type file
errno.121is:RemoteI/O error
errno.122is:Diskquota exceeded
errno.123is:Nomedium found
errno.124is:Wrongmedium type
errno.125is:Operationcanceled
errno.126is:Requiredkeynotavailable
errno.127is:Keyhas expired
errno.128is:Keyhas been revoked
errno.129is:Keywas rejectedbyservice
errno.130is:Ownerdied
errno.131is:Statenotrecoverable
errno.132is:Unknownerror132
132-255全是Unknown error
windows的错误码信息NumberMacroDescription
1ERROR_INVALID_FUNCTIONIncorrectfunction.
2ERROR_FILE_NOT_FOUNDThesystem cannot find the file specified.
3ERROR_PATH_NOT_FOUNDThesystem cannot find the path specified.
4ERROR_TOO_MANY_OPEN_FILESThesystem cannot open the file.
5ERROR_ACCESS_DENIEDAccessisdenied.
6ERROR_INVALID_HANDLEThehandleisinvalid.
7ERROR_ARENA_TRASHEDThestorage control blocks were destroyed.
8ERROR_NOT_ENOUGH_MEMORYNotenough storageisavailable to processthiscommand.
9ERROR_INVALID_BLOCKThestorage control block addressisinvalid.
10ERROR_BAD_ENVIRONMENTTheenvironmentisincorrect.
11ERROR_BAD_FORMATAnattempt was made to load a programwithan incorrect format.
12ERROR_INVALID_ACCESSTheaccess codeisinvalid.
13ERROR_INVALID_DATAThedataisinvalid.
14ERROR_OUTOFMEMORYNotenough storageisavailable to completethisoperation.
15ERROR_INVALID_DRIVEThesystem cannot find the drive specified.
16ERROR_CURRENT_DIRECTORYThedirectory cannot be removed.
17ERROR_NOT_SAME_DEVICEThesystem cannot move the file to a different disk drive.
18ERROR_NO_MORE_FILESTherearenomore files.
19ERROR_WRITE_PROTECTThemediaiswriteprotected.
20ERROR_BAD_UNITThesystem cannot find the device specified.
21ERROR_NOT_READYThedeviceisnotready.
22ERROR_BAD_COMMANDThedevice doesnotrecognize the command.
23ERROR_CRCDataerror(cyclic redundancy check).
24ERROR_BAD_LENGTHTheprogram issued a command but the command lengthisincorrect.
25ERROR_SEEKThedrive cannot locate a specific areaortrack on the disk.
26ERROR_NOT_DOS_DISKThespecified diskordiskette cannot be accessed.
27ERROR_SECTOR_NOT_FOUNDThedrive cannot find the sector requested.
28ERROR_OUT_OF_PAPERTheprinterisoutof paper.
29ERROR_WRITE_FAULTThesystem cannot write to the specified device.
30ERROR_READ_FAULTThesystem cannot readfromthe specified device.
31ERROR_GEN_FAILUREA device attached to the systemisnotfunctioning.
32ERROR_SHARING_VIOLATIONTheprocess cannot access the file because itisbeing usedbyanother process.
33ERROR_LOCK_VIOLATIONTheprocess cannot access the file because another process has locked a portion of the file.
34ERROR_WRONG_DISKThewrong disketteisinthe drive.Insert%2(VolumeSerialNumber:%3)intodrive%1.
36ERROR_SHARING_BUFFER_EXCEEDEDToomany files openedforsharing.
38ERROR_HANDLE_EOFReachedtheendof the file.
39ERROR_HANDLE_DISK_FULLThediskisfull.
87ERROR_INVALID_PARAMETERTheparameterisincorrect.
112ERROR_DISK_FULLThediskisfull.
123ERROR_INVALID_NAMEThefile name,directory name,orvolume label syntaxisincorrect.
1450ERROR_NO_SYSTEM_RESOURCESInsufficientsystem resources exist to complete the requested service
来源: http://lib.csdn.net/article/mysql/36303