can't create PID file問題處理
今天在啟動MYSQL資料庫時,報如下錯誤:
[root@ora10g mysql]# ./bin/mysqld_safe --user=mysql &
[1] 4005
[root@ora10g mysql]# 101209 16:37:19 mysqld_safe Logging to '/var/log/mysqld.log'.
[root@ora10g mysql]# 101209 16:37:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
[root@ora10g mysql]#
[root@ora10g mysql]#
[root@ora10g mysql]# 101209 16:37:25 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
[1]+ Done ./bin/mysqld_safe --user=mysql
[root@ora10g mysql]#
[root@ora10g mysql]#
[root@ora10g mysql]# more /var/run/mysqld/mysqld.pid
/var/run/mysqld/mysqld.pid: No such file or directory
[root@ora10g mysql]# more /var/log/mysqld.log
101209 16:37:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
101209 16:37:20 InnoDB: The InnoDB memory heap is disabled
101209 16:37:20 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
101209 16:37:20 InnoDB: Compressed tables use zlib 1.2.3
101209 16:37:20 InnoDB: Initializing buffer pool, size = 128.0M
101209 16:37:20 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
101209 16:37:21 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
101209 16:37:22 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
101209 16:37:22 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
101209 16:37:24 InnoDB: Waiting for the background threads to start
101209 16:37:25 InnoDB: 1.1.5 started; log sequence number 0
101209 16:37:25 [ERROR] /usr/local/mysql/bin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 2)
101209 16:37:25 [ERROR] Can't start server: can't create PID file: No such file or directory
101209 16:37:25 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
從表面上來看,這應該是訪問許可權不夠,確認:
1、到/var/run目錄下檢視:
[root@ora10g mysql]# cd /var/run
[root@ora10g run]# ls -l mysqld*
ls: mysqld*: No such file or directory
2、建立該目錄,並將其許可權賦給mysql使用者
[root@ora10g run]# mkdir mysqld
[root@ora10g run]# cd mysqld
[root@ora10g mysqld]# ls -l
total 0
[root@ora10g mysqld]# cd ..
[root@ora10g run]# chown -R mysql:mysql /var/run/mysqld
[root@ora10g run]#
3、啟動mysql資料庫程式
[root@ora10g run]# cd /usr/local/mysql
[root@ora10g mysql]# bin/mysqld_safe --user=mysql &
[1] 4350
[root@ora10g mysql]# 101209 16:46:00 mysqld_safe Logging to '/var/log/mysqld.log'.
101209 16:46:00 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
4、確認
[root@ora10g mysql]# tail -10f /var/log/mysqld.log
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1595675
101209 16:46:00 InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
101209 16:46:00 InnoDB: 1.1.5 started; log sequence number 1595675
101209 16:46:00 [Note] Event Scheduler: Loaded 0 events
101209 16:46:00 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.5.9' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
[root@ora10g mysql]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.9 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> \q
Bye
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12350275/viewspace-689321/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 小白:關於處理“can't find '__main__' module in ”這個問題的詳細處理方式!AI
- 【crontab】“bad minute”及“errors in crontab file, can't install”錯誤處理Error
- mysql [ERROR] Can't create IP socket: Permission deniedMySqlError
- 解決can't find -lGL的問題
- MongoDB報錯:"assertion" : "can't map file memory"MongoDB
- create pfile時報ORA-27037問題的處理
- mha_replication_check Can't exec "mysqlbinlog": No such file or directoryMySql
- errors in crontab file, can't install. - linux crontabErrorLinux
- linux上“rman can't open target”問題解決Linux
- ERROR 1135 (HY000): Can't create a new threadErrorthread
- 【問題處理】啟動OUI丟擲libXp.so.6: cannot open shared object file問題處理UIObject
- mysqld: File './binlog.~rec~' not found 問題解決處理MySql
- 解決問題:Variable 'time_zone' can't be set to the value of 'NULL'Null
- VMware虛擬機器Reason: Failed to lock the file問題處理虛擬機AI
- MySQL案例-不同尋常的[ERROR]Can't create a new thread (errno 11)MySqlErrorthread
- ERROR 1135 (HY000): Can't create a new thread (errno 11)Errorthread
- 【MySQL】ERROR 1005 (HY000): Can't create table' (errno: 150)MySqlError
- 【問題處理】ORA-00376 file xx cannot be read at this time
- GTID複製報錯處理:Last_Error: Error 'Can't drop database 'test';ASTErrorDatabase
- Fatal error: can't check configuration file '/home/watt/proxy/dError
- iOS小記--libtool: can't locate file for: -lPods-xxxiOS
- mysqld: Can‘t create directory ‘E:\Software\mysql-5.7.24-winx64\data\‘ (Errcode: 2 - NoMySql
- [ERR] 1231 - Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'SQL
- ERROR 1005 (HY000): Can't create table 'starive.SC' (errno: 150)"Error
- 問題解決zipimport.ZipImportError: can‘t decompress data; zlib not availablImportErrorAI
- python報錯問題解決:'ascii' codec can't encode characterPythonASCII
- 處理問題的方法
- perl中文處理問題
- 漢字處理問題?
- xml處理的問題XML
- 貨品問題處理
- 【問題處理】ORA-01113 file xxx need media recovery
- MySQL server PID file could not be found!MySqlServer
- rman: can't open target
- ERROR 1005 (HY000): Can't create table'matrix.system_log' (errno: 150)Error
- 【linux】Can't connect to MySQL server on 'XXX' (13)問題解決方式LinuxMySqlServer
- 【故障處理】Linux下匯入匯出“IMP-00030: failed to create file ... for write”LinuxAI
- Oracle RAC+ADG新增資料檔案失敗處理(db_create_file_dest)Oracle