我很肯定这个问题以前就发生过,我已经看过一些答案了。然而,我没有找到一个完全类似的问题,所以我想我会问一个新的问题。:(
我的网站显示“建立数据库连接错误”,我尝试重新启动MySQL。我检查日志,这是错误消息。任何帮助都将是非常感谢的,我已经花了相当多的时间在这方面,但没有任何效果。
2018-08-01T17:18:51.984109Z 0 [Note] InnoDB: Unable to open the first data file
2018-08-01T17:18:51.984121Z 0 [ERROR] InnoDB: Operating system error number 11 in a file operation.
2018-08-01T17:18:51.984129Z 0 [ERROR] InnoDB: Error number 11 means 'Resource temporarily unavailable'
2018-08-01T17:18:51.984133Z 0 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2018-08-01T17:18:51.984139Z 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
2018-08-01T17:18:51.984145Z 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2018-08-01T17:18:51.984150Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Cannot open a file
2018-08-01T17:18:52.584934Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-08-01T17:18:52.584967Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-08-01T17:18:52.584972Z 0 [ERROR] Failed to initialize builtin plugins.
2018-08-01T17:18:52.584975Z 0 [ERROR] Aborting
2018-08-01T17:18:52.584990Z 0 [Note] Binlog end
2018-08-01T17:18:52.585049Z 0 [Note] Shutting down plugin 'MyISAM'
2018-08-01T17:18:52.585068Z 0 [Note] Shutting down plugin 'CSV'
2018-08-01T17:18:52.585461Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
2018-08-01T17:18:52.641840Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-08-01T17:18:52.641897Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2018-08-01T17:18:52.807083Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-08-01T17:18:52.808242Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.23-0ubuntu0.16.04.1) starting as process 609 ...
2018-08-01T17:18:52.812171Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-08-01T17:18:52.812195Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-08-01T17:18:52.812199Z 0 [Note] InnoDB: Uses event mutexes
2018-08-01T17:18:52.812203Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-08-01T17:18:52.812206Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-08-01T17:18:52.812210Z 0 [Note] InnoDB: Using Linux native AIO
2018-08-01T17:18:52.812492Z 0 [Note] InnoDB: Number of pools: 1
2018-08-01T17:18:52.812615Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-08-01T17:18:52.814284Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-08-01T17:18:52.822729Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-08-01T17:18:52.825024Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-08-01T17:18:52.835092Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-08-01T17:18:52.835119Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2018-08-01T17:18:52.835123Z 0 [Note] InnoDB: Retrying to lock the first data file
2018-08-01T17:18:53.835259Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
2018-08-01T17:18:53.835290Z 0 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
2018-08-01T17:18:54.835429Z 0 [ERROR] InnoDB: Unable to lock ./ibdata1 error: 11
发布于 2020-12-17 05:47:51
若要将代码转换为文本,请使用perror:
perror 11
OS error code 11: Resource temporarily unavailable
由于ibdata1上的锁请求已经被另一个mysqld进程锁定,所以锁定尝试被拒绝。
终止另一个mysqld进程,看看它是否处于正常使用状态,是适当的行动路线。
https://dba.stackexchange.com/questions/213805
复制相似问题