Задать вопрос
  • Как пофиксить внезапную ошибку 2002 (HY000) mysql - mariadb под Mac OS Big Sur?

    @lagudal Автор вопроса
    еще предлагают запустить сервер -
    mysql.server start
    в этом случае
    @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!

    В логе то же самое что я привет выше.
    Если я правильно понимаю лог, я запускаю сервер, но на каком то этапе error и aborting.
    Если я запускаю штатно сервис - brew services start mariadb - попытка запуска повторяется каждые 10 секунд.
    Похоже, что с правами что то не так?
    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
  • Как пофиксить внезапную ошибку 2002 (HY000) mysql - mariadb под Mac OS Big Sur?

    @lagudal Автор вопроса
    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


    Если от root
    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 stop mariadb
    Очевидно что сервер не запускается, поскольку если я запускаю сервис -
    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


    в реальности сервер не запущен. Монитор его не видит, хотя должен.
    Nginx, php-fpm процессы видит, а mysqld, или mysql или mariadb процесса в мониторе нет.
  • Как пофиксить внезапную ошибку 2002 (HY000) mysql - mariadb под Mac OS Big Sur?

    @lagudal Автор вопроса
    - а когда последние сообщения?

    Сегодня вижу что там лог заполняется каждые 10 секунд, но не вижу там ничего по поводу сокетов.
    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
  • Как пофиксить внезапную ошибку 2002 (HY000) mysql - mariadb под Mac OS Big Sur?

    @lagudal Автор вопроса
    честно говоря я не нашел где логи от mariadb тут хранятся - есть в домашней директории ~/Library/Logs/Homebrew/mariadb - но там девственно чисто.
    Еще нашел по /usr/local/var/mysql/ -там пару файлов вида username.local.err и username.label.intern.err - но там тоже не отображены никакие сегодняшние ошибки...
  • Как пофиксить внезапную ошибку 2002 (HY000) mysql - mariadb под Mac OS Big Sur?

    @lagudal Автор вопроса
    brew services status mysql

    Error: Invalid usage: unknown subcommand: status
    вообще то вроде как brew services list -
    @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

    стоп, старт, рестарт не помогают
  • Как сделать обработку клика в нужном порядке?

    @lagudal Автор вопроса
    Artem Ryzhov,
    спасибо, именно так я и хотел.
  • Как сделать обработку клика в нужном порядке?

    @lagudal Автор вопроса
    условие не изменять код фунций, а добавить - я ж вроде написал...
  • Можно ли редактировать php извне?

    @lagudal Автор вопроса
    Евгений,
    нет, дело не в этом. Речь только об оптимальном решении, минимизации и чистоте кода.
    Например, как я сказал, есть большой файл file1.php, в котором в цикле foreach формируется список. Этот список состоит из изначально неясного числа элементов, пусть упрощенно в каждом элементе 2 значения - кол-во и цена.
    Есть несколько дополняемых функциональней, например, одна из них - по мере формирования собираем полный массив, преобразовываем массив в json и передаем на фронтенд в виде дата-атрибута.
    Для последнего - передачи - я сейчас тупо пишу пустой див, ему даю этот атрибут.
    Лучше и чище было бы сразу дать нужный атрибут самому списку, чем плодить дивы - но тут проблема в том, что пока список не создался полностью, я не знаю значения того что буду давать как атрибут.
    Спасибо Павел навел на мысль: конкретно эту задачу можно решить - в новом php прописать js, используя переменные php.
    А вот как интересно в цикл в старом файле внести изменения в новом файле? Придется заново прописать этот цикл, внося туда только то что нужно?
  • Как добавлять/удалять css-классы в vuejs vue-select?

    @lagudal Автор вопроса
    спасибо, то что надо.
  • Как добавлять/удалять css-классы в vuejs vue-select?

    @lagudal Автор вопроса
    можно, только добавить удаление классов перед добавлением выбранного, иначе классы накладываются.
    document.querySelector('#box').classList.remove('full','half','third','narrow');
  • После обновления MacOS до Big Sur nginx не работает на 80 порту. Почему?

    @lagudal Автор вопроса
    что то мне кажется, что надо дождаться нормальной поддежки brew Big Sur.
    brew upgrade - начинаются какие то пакеты скачиваться, потом все тормозит на этом
    Error: Your CLT does not support macOS 11.0.
  • После обновления MacOS до Big Sur nginx не работает на 80 порту. Почему?

    @lagudal Автор вопроса
    Sand,
    -rw-r--r--   1 alexandern staff   571 20 Nov 13:58 homebrew.mxcl.nginx.plist
  • После обновления MacOS до Big Sur nginx не работает на 80 порту. Почему?

    @lagudal Автор вопроса
    Sand,
    если запускаю brew services start nginx, то
    brew services list       
    Name    Status  User            Plist
    mariadb started alexandern /Users/alexandern/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
    nginx   started alexandern /Users/alexandern/Library/LaunchAgents/homebrew.mxcl.nginx.plist
    php@7.2 started alexandern /Users/alexandern/Library/LaunchAgents/homebrew.mxcl.php@7.2.plist

    если запускаю
    sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist

    то
    brew services list       
    Name    Status  User            Plist
    mariadb started alexandern /Users/alexandern/Library/LaunchAgents/homebrew.mxcl.mariadb.plist
    nginx   started root            /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
    php@7.2 started alexandern /Users/alexandern/Library/LaunchAgents/homebrew.mxcl.php@7.2.plist

    В общем тут я что то явно недопонимаю.
  • После обновления MacOS до Big Sur nginx не работает на 80 порту. Почему?

    @lagudal Автор вопроса
    Sand,
    так вот здесь где то видимо проблема.
    sudo launchctl unload /System/Library/LaunchDaemons/nginx.plist
    Password:
    /System/Library/LaunchDaemons/nginx.plist: No such file or directory
    Unload failed: 2: No such file or directory

    вообще копировать в /System/Library/LaunchDaemens не дает
    sudo cp /usr/local/opt/nginx/*.plist /System/Library/LaunchDaemons 
    cp: /System/Library/LaunchDaemons/homebrew.mxcl.nginx.plist: Operation not permitted

    Гугл привел что копировать надо в /Library/LaunchDaemons, сюда дает копировать, запускать и останавливать.
    Запускаю -
    sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist


    Останавливаю -
    sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.nginx.plist


    проверяю
    sudo lsof -nP -i4TCP:80 | grep LISTEN
    nginx   8616 alexandern   6u  IPv4 0x3173d3f6304c8bd1      0t0  TCP *:80 (LISTEN)
    nginx   8619 alexandern   6u  IPv4 0x3173d3f6304c8bd1      0t0  TCP *:80 (LISTE


    запускаю nginx -
    brew services start nginx -
    никакого прогресса...
  • После обновления MacOS до Big Sur nginx не работает на 80 порту. Почему?

    @lagudal Автор вопроса
    alexandern@Alexanders-MacBook-Pro ~ % sudo lsof -nP -i4TCP:80 | grep LISTEN 
    nginx   3288 alexandern 6u  IPv4 0x3173d3f630ca05e9      0t0  TCP *:80 (LISTEN)
    nginx   3291 alexandern  6u  IPv4 0x3173d3f630ca05e9      0t0  TCP *:80 (LISTEN)
  • Как центрировать вертикально текст с изменяемым размером шрифта?

    @lagudal Автор вопроса
    Danny Arty,
    нет, горизонтальные линии здесь чисто вспомогательные, чтобы при увеличении шрифта было более наглядно видно, как располагается строка.
  • Какие деректории можно спокойно исключить из git/deployment в Magento2?

    @lagudal
    camradee,
    лить в гит нужно только то, где у вас будут изменения. Вы написали, что у вас планируется свой дизайн плюс возможно свои модули. Вот их в гит, больше туда ничего.
    Все остальные изменения которые у вас будут, это медиа файлы и бд. Т.е. вы можете если хотите хранить в гит еще pub/media, или можете настроить бекап любым удобным/привычным способом.
    Так же и с базой.
  • Почему сообщения, отправленные из контактной формы сайта, попадают в спам?

    @lagudal Автор вопроса
    отсылаю из своего домена - собственно я не рассылаю письма, а хочу только чтобы письма, отправленные мне с контакт-формы моего сайта, приходили бы на определенный адрес и не терялись бы.
    Сейчас я смог настроить таким образом, что все доходит, только если я принудительно указываю адрес отправителя - т.е. в приведенном выше коде формы - вот тут- "From:" . $_POST['email'] ) - вместо $_POST['email']пишу contact@mysite.com
    Все тогда проходит, но я тогда не вижу реального адреса отправителя...
    Да, DKIM , SPF все добавлены, домен и ip в блек-листах не фигурируют...