PDOException: SQLSTATE[HY000] [2002] No such file or directory in /usr/local/.....
mysql -u root -p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
@Alexanders-MacBook-Pro var % mysqladmin -u root -p status
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
@Alexanders-MacBook-Pro /tmp % mysqld --help --verbose | grep sock
socket /tmp/mysql.sock
unix-socket ON
brew services status mysql
Error: Invalid usage: unknown subcommand: status
@Alexanders-MacBook-Pro bin % brew services list
Name Status User Plist
mariadb started alexander /Users/alexander/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
nginx started alexander/Users/alexandernaumov/Library/LaunchAgents/homebrew.mxcl.nginx.plist
php@7.2 started alexander /Users/alexander/Library/LaunchAgents/homebrew.mxcl.php@7.2.plist
- а когда последние сообщения?
2021-01-28 10:35:51 0 [Note] InnoDB: Uses event mutexes
2021-01-28 10:35:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-01-28 10:35:51 0 [Note] InnoDB: Number of pools: 1
2021-01-28 10:35:51 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-01-28 10:35:51 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-01-28 10:35:51 0 [Note] InnoDB: Completed initialization of buffer pool
2021-01-28 10:35:51 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=348758843,348758843
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store1.ibd' with space ID 11400, since the redo log references ./magento/catalog_category_product_index_store1.ibd with space ID 10408.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store2.ibd' with space ID 11401, since the redo log references ./magento/catalog_category_product_index_store2.ibd with space ID 10409.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalog_product_index_eav.ibd' with space ID 11405, since the redo log references ./magento/catalog_product_index_eav.ibd with space ID 10413.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/cataloginventory_stock_status.ibd' with space ID 11407, since the redo log references ./magento/cataloginventory_stock_status.ibd with space ID 10415.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalog_product_index_price.ibd' with space ID 11408, since the redo log references ./magento/catalog_product_index_price.ibd with space ID 10416.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalogsearch_fulltext_scope1.ibd' with space ID 11409, since the redo log references ./magento/catalogsearch_fulltext_scope1.ibd with space ID 10417.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalogsearch_fulltext_scope2.ibd' with space ID 11421, since the redo log references ./magento/catalogsearch_fulltext_scope2.ibd with space ID 10429.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento233/design_config_grid_flat.ibd' with space ID 11433, since the redo log references ./magento233/design_config_grid_flat.ibd with space ID 11050.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento233/customer_grid_flat.ibd' with space ID 11445, since the redo log references ./magento233/customer_grid_flat.ibd with space ID 11062.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/design_config_grid_flat.ibd' with space ID 11376, since the redo log references ./magento/design_config_grid_flat.ibd with space ID 11270.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/customer_grid_flat.ibd' with space ID 11388, since the redo log references ./magento/customer_grid_flat.ibd with space ID 11282.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/design_config_grid_flat.ibd' with space ID 11376, since the redo log references ./magento/design_config_grid_flat.ibd with space ID 11295.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/customer_grid_flat.ibd' with space ID 11388, since the redo log references ./magento/customer_grid_flat.ibd with space ID 11307.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/design_config_grid_flat.ibd' with space ID 11376, since the redo log references ./magento/design_config_grid_flat.ibd with space ID 11319.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/customer_grid_flat.ibd' with space ID 11388, since the redo log references ./magento/customer_grid_flat.ibd with space ID 11331.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store1_replica.ibd' with space ID 11343, since the redo log references ./magento/catalog_category_product_index_store1_replica.ibd with space ID 10297.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store2_replica.ibd' with space ID 11344, since the redo log references ./magento/catalog_category_product_index_store2_replica.ibd with space ID 10298.
2021-01-28 10:35:51 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store1.ibd' with space ID 11343. Another data file called ./magento/catalog_category_product_index_store1_replica.ibd exists with the same space ID.
2021-01-28 10:35:51 0 [ERROR] InnoDB: Cannot rename './magento/catalog_category_product_index_store1_replica.ibd' to './magento/catalog_category_product_index_store1.ibd' because the target file exists. Remove the target file and try again.
2021-01-28 10:35:51 0 [ERROR] InnoDB: Cannot replay file rename. Remove either file and try again.
2021-01-28 10:35:51 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-01-28 10:35:51 0 [Note] InnoDB: Starting shutdown...
2021-01-28 10:35:51 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-01-28 10:35:51 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-01-28 10:35:51 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-01-28 10:35:51 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-01-28 10:35:51 0 [ERROR] Aborting
mysql -h localhost
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
Можно попробовать остановить сервисе и запустить mysqld вручную - может в консоли что-то увидим
@Alexanders-MacBook-Pro mysql % mysqld
2021-01-28 10:15:04 0 [Note] mysqld (mysqld 10.5.8-MariaDB) starting as process 67507 ...
2021-01-28 10:15:04 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
2021-01-28 10:15:04 0 [Note] InnoDB: Uses event mutexes
2021-01-28 10:15:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-01-28 10:15:04 0 [Note] InnoDB: Number of pools: 1
2021-01-28 10:15:04 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2021-01-28 10:15:04 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2021-01-28 10:15:04 0 [Note] InnoDB: Completed initialization of buffer pool
2021-01-28 10:15:04 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=348758843,348758843
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store1.ibd' with space ID 11400, since the redo log references ./magento/catalog_category_product_index_store1.ibd with space ID 10408.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store2.ibd' with space ID 11401, since the redo log references ./magento/catalog_category_product_index_store2.ibd with space ID 10409.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalog_product_index_eav.ibd' with space ID 11405, since the redo log references ./magento/catalog_product_index_eav.ibd with space ID 10413.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/cataloginventory_stock_status.ibd' with space ID 11407, since the redo log references ./magento/cataloginventory_stock_status.ibd with space ID 10415.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalog_product_index_price.ibd' with space ID 11408, since the redo log references ./magento/catalog_product_index_price.ibd with space ID 10416.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalogsearch_fulltext_scope1.ibd' with space ID 11409, since the redo log references ./magento/catalogsearch_fulltext_scope1.ibd with space ID 10417.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalogsearch_fulltext_scope2.ibd' with space ID 11421, since the redo log references ./magento/catalogsearch_fulltext_scope2.ibd with space ID 10429.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento233/design_config_grid_flat.ibd' with space ID 11433, since the redo log references ./magento233/design_config_grid_flat.ibd with space ID 11050.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento233/customer_grid_flat.ibd' with space ID 11445, since the redo log references ./magento233/customer_grid_flat.ibd with space ID 11062.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/design_config_grid_flat.ibd' with space ID 11376, since the redo log references ./magento/design_config_grid_flat.ibd with space ID 11270.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/customer_grid_flat.ibd' with space ID 11388, since the redo log references ./magento/customer_grid_flat.ibd with space ID 11282.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/design_config_grid_flat.ibd' with space ID 11376, since the redo log references ./magento/design_config_grid_flat.ibd with space ID 11295.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/customer_grid_flat.ibd' with space ID 11388, since the redo log references ./magento/customer_grid_flat.ibd with space ID 11307.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/design_config_grid_flat.ibd' with space ID 11376, since the redo log references ./magento/design_config_grid_flat.ibd with space ID 11319.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/customer_grid_flat.ibd' with space ID 11388, since the redo log references ./magento/customer_grid_flat.ibd with space ID 11331.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store1_replica.ibd' with space ID 11343, since the redo log references ./magento/catalog_category_product_index_store1_replica.ibd with space ID 10297.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store2_replica.ibd' with space ID 11344, since the redo log references ./magento/catalog_category_product_index_store2_replica.ibd with space ID 10298.
2021-01-28 10:15:04 0 [Note] InnoDB: Ignoring data file './magento/catalog_category_product_index_store1.ibd' with space ID 11343. Another data file called ./magento/catalog_category_product_index_store1_replica.ibd exists with the same space ID.
2021-01-28 10:15:04 0 [ERROR] InnoDB: Cannot rename './magento/catalog_category_product_index_store1_replica.ibd' to './magento/catalog_category_product_index_store1.ibd' because the target file exists. Remove the target file and try again.
2021-01-28 10:15:04 0 [ERROR] InnoDB: Cannot replay file rename. Remove either file and try again.
2021-01-28 10:15:04 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-01-28 10:15:04 0 [Note] InnoDB: Starting shutdown...
2021-01-28 10:15:04 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-01-28 10:15:04 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-01-28 10:15:04 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-01-28 10:15:04 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-01-28 10:15:04 0 [ERROR] Aborting
sh-3.2# mysqld
2021-01-28 10:15:14 0 [Note] mysqld (mysqld 10.5.8-MariaDB) starting as process 67509 ...
2021-01-28 10:15:14 0 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive
mysqld: Please consult the Knowledge Base to find out how to run mysqld as root!
2021-01-28 10:15:14 0 [ERROR] Aborting
brew services start mariadb
@Alexanders-MacBook-Pro mysql % brew services list
Name Status User Plist
mariadb started alexander /Users/alexander/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
@Alexanders-MacBook-Pro mysql % mysql.server start
Starting MariaDB
.210128 11:14:59 mysqld_safe Logging to '/usr/local/var/mysql/Alexanders-MacBook-Pro.local.err'.
210128 11:14:59 mysqld_safe Starting mariadbd daemon with databases from /usr/local/var/mysql
/usr/local/bin/mysql.server: line 264: kill: (90121) - No such process
ERROR!
2021-01-28 11:18:06 0 [ERROR] InnoDB: Cannot rename './magento/catalog_category_product_index_store1_replica.ibd' to './magento/catalog_category_product_index_store1.ibd' because the target file exists. Remove the target file and try again.
2021-01-28 11:18:06 0 [ERROR] InnoDB: Cannot replay file rename. Remove either file and try again.
2021-01-28 11:18:06 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2021-01-28 11:18:06 0 [Note] InnoDB: Starting shutdown...
2021-01-28 11:18:06 0 [ERROR] Plugin 'InnoDB' init function returned error.
2021-01-28 11:18:06 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2021-01-28 11:18:06 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-01-28 11:18:06 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2021-01-28 11:18:06 0 [ERROR] Aborting
Что-то случилось с файлами базы - может их стерли или переименовали директорию?
Что делать? - зависит от того важна ли вам ваша старая база. Если нет - удалить и установить заново mysql, или запустить 'mysqld --initialize' https://dev.mysql.com/doc/refman/5.7/en/server-opt... . Если важна - разбираться что произошло с директорией 'magento'.
[mysqld]
innodb_force_recovery = 1