My situation is the following. I can't remember my root user passsword for accessing mysqld. I'm attempting to start mysqld with the option --skip-grant-tables option in the my.ini configuration file. However, I observe that when I enable the option and then try to restart mysqld (from Task Manager, for example), the service starts, runs, and then immediately stops. I've included a Screencastify video to show you the steps I take (1min50secs long). I'm also including the error file contents below for your review. I see a mention of an error but I don't understand its message.
2022-08-25T17:52:06.012094Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2022-08-25T17:52:06.015237Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.28) starting as process 1048
2022-08-25T17:52:06.045494Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-25T17:52:06.398313Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-08-25T17:52:06.642873Z 0 [Warning] [MY-011311] [Server] Plugin mysqlx reported: 'All I/O interfaces are disabled, X Protocol won't be accessible'
2022-08-25T17:52:06.725383Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-25T17:52:06.726481Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-08-25T17:52:06.757168Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.28' socket: '' port: 0 MySQL Community Server - GPL.
2022-08-25T17:52:06.759476Z 0 [ERROR] [MY-010131] [Server] TCP/IP, --shared-memory, or --named-pipe should be configured on NT OS
2022-08-25T17:52:06.760755Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-08-25T17:52:07.903037Z 0 [ERROR] [MY-013183] [InnoDB] Assertion failure: trx0sys.cc:644:UT_LIST_GET_LEN(trx_sys->mysql_trx_list) == 0 thread 26320
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
17:52:07 UTC - mysqld got exception 0x16 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
7ff78a48fd48 mysqld.exe!?my_print_stacktrace@@YAXPEBEK@Z()
7ff7896c004b mysqld.exe!?print_fatal_signal@@YAXH@Z()
7ff7896bfe13 mysqld.exe!?my_server_abort@@YAXXZ()
7ff78a47643a mysqld.exe!?my_abort@@YAXXZ()
7ff78a6ac579 mysqld.exe!??$endl@DU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@@Z()
7ff78a5e8167 mysqld.exe!?set_compression_level@Zstd_comp@compression@transaction@binary_log@@UEAAXI@Z()
7ff78a67033b mysqld.exe!??$endl@DU?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@@Z()
7ff78a568550 mysqld.exe!?set_compression_level@Zstd_comp@compression@transaction@binary_log@@UEAAXI@Z()
7ff7894a452b mysqld.exe!?ha_finalize_handlerton@@YAHPEAUst_plugin_int@@@Z()
7ff7894e2304 mysqld.exe!?memcached_shutdown@@YAXXZ()
7ff7894e78d9 mysqld.exe!?plugin_unlock_list@@YAXPEAVTHD@@PEAPEAUst_plugin_int@@_K@Z()
7ff7894e6630 mysqld.exe!?plugin_shutdown@@YAXXZ()
7ff789482d49 mysqld.exe!?check_valid_arguments_processor@Item_func@@UEAA_NPEAE@Z()
7ff78949679a mysqld.exe!?underflow@?$basic_stringbuf@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MEAAHXZ()
7ff78949531f mysqld.exe!?setup_conn_event_handler_threads@@YAXXZ()
7ff7894988be mysqld.exe!?win_main@@YAHHPEAPEAD@Z()
7ff7894916f5 mysqld.exe!?mysql_service@@YAHPEAX@Z()
7ff789491d54 mysqld.exe!?mysqld_main@@YAHHPEAPEAD@Z()
7ff78ab0b298 mysqld.exe!?set_timespec_nsec@@YAXPEAUtimespec@@_K@Z()
7ffe8b437034 KERNEL32.DLL!BaseThreadInitThunk()
7ffe8b742651 ntdll.dll!RtlUserThreadStart()
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Any help will be appreciated. Thank you.
CodePudding user response:
Enabling shared memory in server section of config file resolved the issue. See this Stackoverflow post for context.
CodePudding user response:
If you have an issue starting MySQL, try editing the my.ini configuration file, and set innodb_force_recovery to perhaps 3.
Here's how i've reset MySQL root password on Centos; note it's from the command line.
systemctl stop mysqld
systemctl set-environment MYSQLD_OPTS=--skip-grant-tables
systemctl start mysqld
mysql> UPDATE mysql.user SET authentication_string = PASSWORD ('ENTER_NEW_PASSWORD') WHERE User = 'root' AND Host = 'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
systemctl stop mysqld
systemctl unset-environment MYSQLD_OPTS
systemctl start mysqld
# test #
mysql -u root@localhost -p