电脑更新后,数据库无法启动,怎么办

搜索事件查看器

Microsoft Windows [版本 10.0.22631.5189]

(c) Microsoft Corporation。保留所有权利。

C:\Users\华为>mysql -uroot

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.6.49 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> alter user 'root'@'localhost' identified by '2020';

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by '2020'' at line 1

mysql> alter user 'root'@'localhost' identified by 2020;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 2020' at line 1

mysql> alter user root@localhost identified by 2020

    -> ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'identified by 2020' at line 1

mysql> use mysql

Database changed

mysql> update user set password=password("2020");

Query OK, 4 rows affected (0.00 sec)

Rows matched: 4  Changed: 4  Warnings: 0

mysql>

mysql>

mysql>

mysql> quit

Bye

C:\Users\华为>

Microsoft Windows [版本 10.0.22631.5189]

(c) Microsoft Corporation。保留所有权利。

C:\Windows\System32>cd d/ "D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin"

文件名、目录名或卷标语法不正确。

C:\Windows\System32>D:

D:\>cd D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld -install

The service already exists!

The current server installed: D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin\mysqld --defaults-file=D:\mysql-5.6.49-winx64\my.ini MySQL

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysql

服务正在启动或停止中,请稍候片刻后再试一次。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>services.msc

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net stop mysql

服务正在启动或停止中,请稍候片刻后再试一次。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --remove mysql

Service successfully removed.

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --install

The service already exists!

The current server installed: D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin\mysqld --defaults-file=D:\mysql-5.6.49-winx64\my.ini MySQL

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysql

服务正在启动或停止中,请稍候片刻后再试一次。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>tasklist | findstr "mysql"   taskkill /F /IM mysqld.exe

FINDSTR: 无法打开 taskkill

FINDSTR: 无法打开 /F

FINDSTR: 无法打开 /IM

mysqld.exe:   client_connection       server_unix_socket      server_tcpip_socket     Waiting for an event from Coordinator   Waiting for Slave Worker queue  Waiting for Slave Workers to free pending events        Waiting for Slave Worker to release partition   Waiting for workers to exit     Waiting to get readlock Waiting to finalize termination Waiting for the slave SQL thread to advance position    Waiting for the next event in relay log Waiting for query cache lock    Waiting for table flush Waiting for slave thread to start       Waiting for slave mutex on exit Waiting for the slave SQL thread to free enough relay log space Waiting for master update       Waiting for master to send event        Waiting for INSERT      waiting for handler open        waiting for handler lock        waiting for handler insert      waiting for GTID to be written to binary log    waiting for delay_list  verifying table User sleep      User lock       upgrading lock  updating reference tables       updating main table     updating        System lock     storing row into queue  storing result in query cache   Waiting until MASTER_DELAY seconds after master executed event  statistics      Sorting result  Sorting for order       Sorting for group               Slave has read all relay log; waiting for the slave I/O thread to update it setup       Sending data    sending cached result to client Sending binlog event to slave   Searching rows for update       reschedule      Requesting binlog dump  rename result table rename      removing tmp table      Removing duplicates     Registering slave on master     Reading event from the relay log        Queueing master event to the relay log  query end       Purging old relay logs  preparing       optimizing      Opening tables          Master has sent all binlog to slave; waiting for binlog to be updated   manage keys             Making temporary file (create) before replaying LOAD DATA INFILE.               Making temporary file (append) before replaying LOAD DATA INFILE.       logging slow query      Killing slave   invalidating query cache entries (table list)   invalidating query cache entries (table)        got old table   got handler lock        FULLTEXT initialization freeing items   Flushing relay-log info file.   Flushing relay log and master info repository.  Finished reading one binlog; switching to next binlog   explaining      Execution of init_command       executing   end discard_or_import_tablespace    deleting from reference tables  deleting from main table        Creating tmp table      creating table  Creating sort index     Creating delayed handler        copy to tmp table       Copying to tmp table    Copying to group table  converting HEAP to MyISAM       Connecting to master    closing tables  cleaning up     checking query cache for query  checking privileges on cached query     checking permissions    Checking master version Changing master committing alter table to storage engine        altering table  preparing for alter table       allocating local table  After create    init    trigger trigger_name    tclog   slow_log        send_file       relay_log_info  query_log   pid partition   misc        master_info     log_event_info  log_event_data  LOAD_FILE       global_ddl_log  FRM     file_parser     select_to_file  ERRMSG  des_key_file    dbopt   casetest        relaylog_index  relaylog        binlog_index    map     signal_handler  one_connection  main    manager delayed_insert  shutdown        con_sockets     con_shared_mem  con_named_pipes COND_connection_count   COND_flush_thread_cache COND_thread_cache       COND_thread_count       User_level_lock::cond   TABLE_SHARE::cond       Worker_info::jobs_cond  Relay_log_info::pending_jobs_cond       Relay_log_info::sleep_cond      Relay_log_info::stop_cond       Relay_log_info::start_cond      Relay_log_info::log_space_cond  Relay_log_info::data_cond       Master_info::sleep_cond Master_info::stop_cond  Master_info::start_cond Master_info::data_cond  Item_func_sleep::cond   Delayed_insert::cond_client     Delayed_insert::cond    COND_server_started     COND_manager    Query_cache::COND_cache_status_changed  MYSQL_RELAY_LOG::prep_xids_cond MYSQL_RELAY_LOG::update_cond    MYSQL_RELAY_LOG::COND_done      MYSQL_BIN_LOG::prep_xids_cond   MYSQL_BIN_LOG::update_cond      MYSQL_BIN_LOG::COND_done        TC_LOG_MMAP::COND_pool  TC_LOG_MMAP::COND_active        PAGE::cond      COND_handler_count      LOCK_named_pipe_full_access_group       Binlog_storage_delegate::lock   Trans_delegate::lock    gtid_commit_rollback    Query_cache_query::lock LOCK_sys_init_slave     LOCK_sys_init_connect   LOGGER::LOCK_logger     LOCK_grant      Binlog_relay_IO_delegate::lock  Binlog_transmit_delegate::lock  CRYPTO_dynlock_value::lock      LOCK_thread_created     Gtid_state      LOCK_log_throttle_qni   LOCK_thd_remove LOCK_thread_count       LOG_INFO::lock  LOCK_error_messages     TABLE_SHARE::LOCK_ha_data       Query_cache::structure_guard_mutex      Worker_info::jobs_lock  Relay_log_info::temp_tables_lock        Relay_log_info::exit_count_lock Relay_log_info::pending_jobs_lock       Relay_log_info::run_lock        Relay_log_info::log_space_lock  Relay_log_info::sleep_lock      Relay_log_info::data_lock       Slave_reporting_capability::err_lock    Master_info::sleep_lock Master_info::run_lock   Master_info::data_lock  LOG::LOCK_log   LOCK_sql_rand   LOCK_uuid_generator     LOCK_user_conn  THD::LOCK_thd_data      LOCK_table_share        LOCK_system_variables_hash      LOCK_status     LOCK_server_started     LOCK_slave_net_timeout  LOCK_sql_slave_skip_counter     LOCK_prepared_stmt_count        LOCK_manager    LOCK_global_system_variables    LOCK_gdl        LOCK_error_log  LOCK_delayed_status     LOCK_delayed_insert     LOCK_delayed_create     LOCK_crypt      LOCK_connection_count   LOCK_active_mi  hash_filo::lock Delayed_insert::mutex   MYSQL_RELAY_LOG::LOCK_xids      MYSQL_RELAY_LOG::LOCK_sync_queue        MYSQL_RELAY_LOG::LOCK_sync      MYSQL_RELAY_LOG::LOCK_log       MYSQL_RELAY_LOG::LOCK_index     MYSQL_RELAY_LOG::LOCK_flush_queue       MYSQL_RELAY_LOG::LOCK_done      MYSQL_RELAY_LOG::LOCK_commit_queue      MYSQL_RELAY_LOG::LOCK_commit    MYSQL_BIN_LOG::LOCK_xids        MYSQL_BIN_LOG::LOCK_sync_queue  MYSQL_BIN_LOG::LOCK_sync        MYSQL_BIN_LOG::LOCK_log MYSQL_BIN_LOG::LOCK_index       MYSQL_BIN_LOG::LOCK_flush_queue MYSQL_BIN_LOG::LOCK_done        MYSQL_BIN_LOG::LOCK_commit_queue        MYSQL_BIN_LOG::LOCK_commit      LOCK_des_key_file       TC_LOG_MMAP::LOCK_pool  TC_LOG_MMAP::LOCK_active        TC_LOG_MMAP::LOCK_sync  PAGE::lock      Uptime_since_flush_status   Uptime      Threads_running Threads_created Threads_connected       Threads_cached  Tc_log_page_waits       Tc_log_page_size        Tc_log_max_pages_used   Table_open_cache_overflows      Table_open_cache_misses Table_open_cache_hits   Table_locks_waited      Table_locks_immediate   Rsa_public_key  Ssl_server_not_after    Ssl_server_not_before   Ssl_version     Ssl_verify_mode Ssl_verify_depth        Ssl_used_session_cache_entries  Ssl_sessions_reused     Ssl_session_cache_timeouts      Ssl_session_cache_size  Ssl_session_cache_overflows     Ssl_session_cache_mode  Ssl_session_cache_misses        Ssl_session_cache_hits  Ssl_finished_connects   Ssl_finished_accepts    Ssl_default_timeout     Ssl_ctx_verify_mode     Ssl_ctx_verify_depth    Ssl_connect_renegotiates        Ssl_client_connects     Ssl_cipher_list Ssl_cipher      Ssl_callback_cache_hits Ssl_accepts     Ssl_accept_renegotiates Sort_scan       Sort_rows       Sort_range      Sort_merge_passes       Slow_queries    Slow_launch_threads     Slave_running   Slave_last_heartbeat    Slave_received_heartbeats       Slave_heartbeat_period  Slave_retried_transactions      Slave_open_temp_tables  Select_scan     Select_range_check      Select_range    Select_full_range_join  Select_full_join        Questions       Queries Qcache_total_blocks     Qcache_queries_in_cache Qcache_not_cached       Qcache_lowmem_prunes    Qcache_inserts  Qcache_hits     Qcache_free_memory      Qcache_free_blocks      Prepared_stmt_count     Opened_table_definitions        Opened_tables   Opened_files    Open_tables     Open_table_definitions  Open_streams    Open_files      Not_flushed_delayed_rows        Max_used_connections    Last_query_partial_plans        Last_query_cost Key_writes      Key_write_requests      Key_reads       Key_read_requests       Key_blocks_used Key_blocks_unused       Key_blocks_not_flushed  Handler_write   Handler_update  Handler_savepoint_rollback      Handler_savepoint       Handler_rollback        Handler_read_rnd_next   Handler_read_rnd        Handler_read_prev       Handler_read_next       Handler_read_last       Handler_read_key        Handler_read_first      Handler_prepare Handler_mrr_init        Handler_external_lock   Handler_discover        Handler_delete  Handler_commit  Flush_commands  Delayed_writes  Delayed_insert_threads  Delayed_errors  Created_tmp_tables      Created_tmp_files       Created_tmp_disk_tables Connection_errors_tcpwrap       Connection_errors_select        Connection_errors_peer_address  Connection_errors_max_connections       Connection_errors_internal      Connection_errors_accept        Connections     Compression Com Bytes_sent      Bytes_received  Binlog_stmt_cache_use   Binlog_stmt_cache_disk_use      Binlog_cache_use        Binlog_cache_disk_use   Aborted_connects        Aborted_clients         Defines what password- and authentication algorithm to use per default  default_authentication_plugin           Optional semicolon-separated list of plugins to load, where each plugin is identified as name=library, where name is the plugin name and library is the plugin library in plugin_dir. This option adds to the list speficied by --plugin-load in an incremental way. Multiple --plugin-load-add are supported.  plugin-load-add Optional semicolon-separated list of plugins to load, where each plugin is identified as name=library, where name is the plugin name and library is the plugin library in plugin_dir.   plugin-load     Run mysqld daemon as user.  user        Default transaction access mode. True if transactions are read-only.    transaction-read-only   Default transaction isolation level.    transaction-isolation   This option is ignored on this OS.      temp-pool               Decision to use in heuristic recover process. Possible values are COMMIT or ROLLBACK.   tc-heuristic-recover    Non-default option to alias SYSDATE() to NOW() to make it safe-replicable. Since 5.0, SYSDATE() returns a `dynamic' value different for different invocations, even within the same statement.  sysdate-is-now  Enable symbolic link support.   symbolic-links  Dummy option to start as a standalone program (NT).     standalone              Enable SSL for connection (automatically enabled with other flags). ssl sporadic-binlog-dump-fail               Maximum number of milliseconds that the service control manager should wait before trying to kill the windows service during startup(Default: 15000).   slow-start-timeout      Don't print a stack trace on failure.   skip-stack-trace        If set, slave is not autostarted.       skip-slave-start        Don't use new, possibly wrong routines. skip-new        Don't cache host names. skip-host-cache Show user and password in SHOW SLAVE HOSTS on this master.      show-slave-auth-info            Don't allow new user creation by the user who has no write privileges to the mysql.user table.  safe-user-create                Tells the slave thread to not replicate to the tables that match the given wildcard pattern. To specify more than one table to ignore, use the directive multiple times, once for each table. This will work for cross-database updates. Example: replicate-wild-ignore-table=foo%.bar% will not do updates to tables in databases that start with foo and whose table names start with bar.    replicate-wild-ignore-table     Tells the slave thread to restrict replication to the tables that match the specified wildcard pattern. To specify more than one table, use the directive multiple times, once for each table. This will work for cross-database updates. Example: replicate-wild-do-table=foo%.bar% will replicate only updates to tables in all databases that start with foo and whose table names start with bar.   replicate-wild-do-table In replication, if set to 1, do not skip events having our server id. Default value is 0 (to break infinite loops in circular replication). Can't be set to 1 if --log-slave-updates is used.   replicate-same-server-id        Updates to a database with a different name than the original. Example: replicate-rewrite-db=master_db_name->slave_db_name.     replicate-rewrite-db            Tells the slave thread to not replicate to the specified table. To specify more than one table to ignore, use the directive multiple times, once for each table. This will work for cross-database updates, in contrast to replicate-ignore-db. replicate-ignore-table          Tells the slave thread to not replicate to the specified database. To specify more than one database to ignore, use the directive multiple times, once for each database. This option will not work if you use cross database updates. If you need cross database updates to work, make sure you have 3.23.28 or later, and use replicate-wild-ignore-table=db_name.%.  replicate-ignore-db     Tells the slave thread to restrict replication to the specified table. To specify more than one table, use the directive multiple times, once for each table. This will work for cross-database updates, in contrast to replicate-do-db.        replicate-do-table              Tells the slave thread to restrict replication to the specified database. To specify more than one database, use the directive multiple times, once for each database. Note that this will only work if you do not use cross-database queries such as UPDATE some_db.some_table SET foo='bar' while having selected a different or no database. If you need cross database updates to work, make sure you have 3.23.28 or later, and use replicate-wild-do-table=db_name.%.     replicate-do-db Maximum time in seconds to wait for the port to become free. (Default: No wait).        port-open-timeout       Enable old-style user limits (before 5.0.3, user resources were counted per each user+host vs. per account).    old-style-user-limits   Lock mysqld in memory.  memlock max-binlog-dump-events  The number of tries the slave will make to connect to the master before giving up. Deprecated option, use 'CHANGE MASTER TO master_retry_count = <num>' instead.        master-retry-count      The location and name of the file that remembers the master and where the I/O replication thread is in the master's binlogs.    master-info-file        Size of transaction coordinator log.    log-tc-size     Path to transaction coordinator log (used for transactions that affect more than one storage engine, when binary log is disabled).  log-tc      Don't log extra information to update and slow-query logs.      log-short-format                Log to general log before any rewriting of the query. For use in debugging, not production as sensitive information may be logged.      log-raw Log all MyISAM changes to file. log-isam        File that holds the names for relay log files.  relay-log-index File that holds the names for binary log files. log-bin-index   Log update queries in binary format. Optional (but strongly recommended to avoid replication problems if server's hostname changes) argument should be the chosen location for the binary log files.    log-bin Set the language used for the month names and the days of the week.     lc-time-names   Set the language used for the error messages.   lc-messages             Client error messages in given language. May be given as a full path. Deprecated. Use --lc-messages-dir instead.        language                Specifies a directory to add to the ignore list when collecting database names from the datadir. Put a blank argument to reset the list accumulated so far.     ignore-db-dir   Set up signals usable for debugging.    gdb     Use system (external) locking (disabled by default).  With this option enabled you can run myisamchk to test (not repair) tables while the MySQL server is running. Disable with --skip-external-locking.       external-locking        Used for debugging. Use at your own risk.       exit-info       disconnect-slave-event-count    Load keys for des_encrypt() and des_encrypt from given file.    des-key-file    Set the default time zone.      default-time-zone       The default storage engine for new explict temporary tables     default-tmp-storage-engine      The default storage engine for new tables       default-storage-engine  Write core on errors.   core-file       Write error output on screen; don't remove the console window on windows.       console Set the default collation.      collation-server        Chroot mysqld daemon during startup.    chroot  Set the default character set.  character-set-server    Set the filesystem character set.       character-set-filesystem        Don't ignore client side character set value sent during handshake.     character-set-client-handshake          The maximum size of a row-based binary log event in bytes. Rows will be grouped into events smaller than this size if possible. The value has to be a multiple of 256.  binlog-row-event-max-size               Tells the master that updates to the given database should not be logged to the binary log.     binlog-ignore-db                Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned.     binlog-do-db    Set default value for autocommit (0 or 1)       autocommit              Use ANSI SQL syntax instead of MySQL syntax. This mode will also set transaction isolation level 'serializable'.    ansi        Allows use of UDFs consisting of only one symbol xxx() without corresponding xxx_init() or xxx_deinit(). That also means that one can load any function from any library, for example exit() from libc.so       allow-suspicious-udfs           Option used by mysql-test for debugging and testing of replication.     abort-slave-event-count Output version information and exit.    version Used with --help option for detailed help.      verbose Display this help and exit.             Start without grant tables. This gives all users FULL ACCESS to all tables.     skip-grant-tables       Used by mysql installation scripts.     bootstrap       xa_start        xa_rollback     xa_recover      xa_prepare  xa_end      xa_commit       update_multi    update  unlock_tables   uninstall_plugin        truncate        stmt_send_long_data     stmt_reset      stmt_reprepare  stmt_prepare    stmt_fetch      stmt_execute    stmt_close      slave_stop      slave_start     show_warnings   show_variables  show_triggers   show_tables     show_table_status       show_storage_engines    show_status     show_slave_status       show_slave_hosts        show_relaylog_events    show_profiles   show_profile    show_processlist        show_procedure_status   show_procedure_code     show_privileges show_plugins    show_open_tables        show_master_status      show_keys       show_grants     show_function_status    show_function_code      show_fields     show_errors     show_events     show_engine_status      show_engine_mutex       show_engine_logs        show_databases  show_create_trigger     show_create_table       show_create_proc        show_create_func        show_create_event       show_create_db  show_collations show_charsets   show_binlogs    show_binlog_events  signal      set_option  select      savepoint       rollback_to_savepoint   rollback        revoke_all  revoke      resignal    reset       replace_select  replace repair  rename_user     rename_table    release_savepoint       purge_before_date   purge       prepare_sql     preload_keys    optimize        lock_tables load    kill        install_plugin  insert_select   insert  help    ha_read ha_open ha_close    grant       get_diagnostics flush   execute_sql     empty_query     drop_view       drop_user       drop_trigger    drop_table      drop_server     drop_procedure  drop_index      drop_function   drop_event      drop_db do      delete_multi    delete  dealloc_sql     create_view     create_user     create_udf      create_trigger  create_table    create_server   create_procedure        create_index    create_function create_event    create_db   commit      checksum    check       change_master   change_db       call_procedure  binlog  begin   analyze alter_user      alter_tablespace        alter_table     alter_server    alter_procedure alter_function  alter_event     alter_db_upgrade        alter_db        assign_to_keycache      admin_commands  mysqld-5.6  server  mysqld  *   MYSQL   <IN HAVING>     <IN COND>       <left expr> .   ON      UPGRADE_STEP_2  UPGRADE_STEP_1  OFF     ABORT_SERVER    IGNORE_ERROR    ROW     STATEMENT   MIXED   NONE        DELAYED localhost   BINARY  first       ROLLBACK    COMMIT      DISABLED    NO  YES                                                                               @   €                     @   €                     @   €                                    $              €          8    8         


?
             FINDSTR: 写入错误

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>tasklist | findstr "mysql"

mysqld.exe                    5620 Services                   0     22,224 K

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>taskkill /F /IM mysqld.exe

成功: 已终止进程 "mysqld.exe",其 PID 为 5620。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --remove mysql

The service doesn't exist!

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>cd..

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64>cd D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\my.ini

目录名称无效。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64>cd "D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\my.ini"

目录名称无效。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64>rd /s /q D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\data

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64>cd /d D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>rd /s /q D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\data

系统找不到指定的文件。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --initialize-insecure --user=mysql

2025-04-23 00:43:27 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2025-04-23 00:43:27 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2025-04-23 00:43:27 0 [Note] mysqld (mysqld 5.6.49) starting as process 38056 ...

2025-04-23 00:43:27 38056 [Warning] Can't create test file D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\data\小白.lower-test

2025-04-23 00:43:27 38056 [Warning] Can't create test file D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\data\小白.lower-test

mysqld: Can't change dir to 'D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\data\' (Errcode: 2 - No such file or directory)

2025-04-23 00:43:27 38056 [ERROR] Aborting

2025-04-23 00:43:27 38056 [Note] Binlog end

2025-04-23 00:43:27 38056 [Note] mysqld: Shutdown complete

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --initialize --user=mysql --console

2025-04-23 00:52:15 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2025-04-23 00:52:15 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2025-04-23 00:52:15 0 [Note] mysqld (mysqld 5.6.49) starting as process 13396 ...

2025-04-23 00:52:15 13396 [Note] Plugin 'FEDERATED' is disabled.

mysqld: Table 'mysql.plugin' doesn't exist

2025-04-23 00:52:15 13396 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

2025-04-23 00:52:15 13396 [Note] InnoDB: Using atomics to ref count buffer pool pages

2025-04-23 00:52:15 13396 [Note] InnoDB: The InnoDB memory heap is disabled

2025-04-23 00:52:15 13396 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

2025-04-23 00:52:15 13396 [Note] InnoDB: Memory barrier is not used

2025-04-23 00:52:15 13396 [Note] InnoDB: Compressed tables use zlib 1.2.11

2025-04-23 00:52:15 13396 [Note] InnoDB: Not using CPU crc32 instructions

2025-04-23 00:52:15 13396 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2025-04-23 00:52:15 13396 [Note] InnoDB: Completed initialization of buffer pool

2025-04-23 00:52:15 13396 [Note] InnoDB: The first specified data file .\ibdata1 did not exist: a new database to be created!

2025-04-23 00:52:15 13396 [Note] InnoDB: Setting file .\ibdata1 size to 12 MB

2025-04-23 00:52:15 13396 [Note] InnoDB: Database physically writes the file full: wait...

2025-04-23 00:52:15 13396 [Note] InnoDB: Setting log file .\ib_logfile101 size to 48 MB

2025-04-23 00:52:15 13396 [Note] InnoDB: Setting log file .\ib_logfile1 size to 48 MB

2025-04-23 00:52:15 13396 [Note] InnoDB: Renaming log file .\ib_logfile101 to .\ib_logfile0

2025-04-23 00:52:15 13396 [Warning] InnoDB: New log files created, LSN=45781

2025-04-23 00:52:15 13396 [Note] InnoDB: Doublewrite buffer not found: creating new

2025-04-23 00:52:15 13396 [Note] InnoDB: Doublewrite buffer created

2025-04-23 00:52:15 13396 [Note] InnoDB: 128 rollback segment(s) are active.

2025-04-23 00:52:15 13396 [Warning] InnoDB: Creating foreign key constraint system tables.

2025-04-23 00:52:15 13396 [Note] InnoDB: Foreign key constraint system tables created

2025-04-23 00:52:15 13396 [Note] InnoDB: Creating tablespace and datafile system tables.

2025-04-23 00:52:15 13396 [Note] InnoDB: Tablespace and datafile system tables created.

2025-04-23 00:52:15 13396 [Note] InnoDB: Waiting for purge to start

2025-04-23 00:52:15 13396 [Note] InnoDB: 5.6.49 started; log sequence number 0

2025-04-23 00:52:15 13396 [ERROR] mysqld: unknown option '--initialize'

2025-04-23 00:52:15 13396 [ERROR] Aborting

2025-04-23 00:52:15 13396 [Note] Binlog end

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'partition'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_SYS_TABLES'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_FT_CONFIG'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_FT_DELETED'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_METRICS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_CMPMEM'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_CMP_RESET'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_CMP'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_LOCKS'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'INNODB_TRX'

2025-04-23 00:52:15 13396 [Note] Shutting down plugin 'InnoDB'

2025-04-23 00:52:15 13396 [Note] InnoDB: FTS optimize thread exiting.

2025-04-23 00:52:15 13396 [Note] InnoDB: Starting shutdown...

2025-04-23 00:52:17 13396 [Note] InnoDB: Shutdown completed; log sequence number 1600607

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'BLACKHOLE'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'ARCHIVE'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'MRG_MYISAM'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'MyISAM'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'MEMORY'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'CSV'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'sha256_password'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'mysql_old_password'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'mysql_native_password'

2025-04-23 00:52:17 13396 [Note] Shutting down plugin 'binlog'

2025-04-23 00:52:17 13396 [Note] mysqld: Shutdown complete

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --initialize-insecure --user=mysql --console

2025-04-23 01:08:03 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2025-04-23 01:08:03 0 [Note] mysqld (mysqld 5.6.49) starting as process 31308 ...

2025-04-23 01:08:03 31308 [Note] Plugin 'FEDERATED' is disabled.

mysqld: Table 'mysql.plugin' doesn't exist

2025-04-23 01:08:03 31308 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

2025-04-23 01:08:03 31308 [Note] InnoDB: Using atomics to ref count buffer pool pages

2025-04-23 01:08:03 31308 [Note] InnoDB: The InnoDB memory heap is disabled

2025-04-23 01:08:03 31308 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

2025-04-23 01:08:03 31308 [Note] InnoDB: Memory barrier is not used

2025-04-23 01:08:03 31308 [Note] InnoDB: Compressed tables use zlib 1.2.11

2025-04-23 01:08:03 31308 [Note] InnoDB: Not using CPU crc32 instructions

2025-04-23 01:08:03 31308 [Note] InnoDB: Initializing buffer pool, size = 128.0M

2025-04-23 01:08:03 31308 [Note] InnoDB: Completed initialization of buffer pool

2025-04-23 01:08:03 31308 [Note] InnoDB: Highest supported file format is Barracuda.

2025-04-23 01:08:03 31308 [Note] InnoDB: 128 rollback segment(s) are active.

2025-04-23 01:08:03 31308 [Note] InnoDB: Waiting for purge to start

2025-04-23 01:08:03 31308 [Note] InnoDB: 5.6.49 started; log sequence number 1600607

2025-04-23 01:08:03 31308 [ERROR] mysqld: unknown option '--initialize-insecure'

2025-04-23 01:08:03 31308 [ERROR] Aborting

2025-04-23 01:08:03 31308 [Note] Binlog end

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'partition'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'

2025-04-23 01:08:03 31308 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_SYS_TABLES'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_FT_CONFIG'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_FT_DELETED'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_METRICS'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_CMPMEM'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_CMP_RESET'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_CMP'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_LOCKS'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'INNODB_TRX'

2025-04-23 01:08:04 31308 [Note] Shutting down plugin 'InnoDB'

2025-04-23 01:08:04 31308 [Note] InnoDB: FTS optimize thread exiting.

2025-04-23 01:08:04 31308 [Note] InnoDB: Starting shutdown...

2025-04-23 01:08:05 31308 [Note] InnoDB: Shutdown completed; log sequence number 1600617

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'BLACKHOLE'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'ARCHIVE'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'MRG_MYISAM'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'MyISAM'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'MEMORY'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'CSV'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'sha256_password'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'mysql_old_password'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'mysql_native_password'

2025-04-23 01:08:05 31308 [Note] Shutting down plugin 'binlog'

2025-04-23 01:08:05 31308 [Note] mysqld: Shutdown complete

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysql_upgrade.exe -u root -p --force

Enter password: ****

Looking for 'mysql.exe' as: D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin\mysql.exe

Looking for 'mysqlcheck.exe' as: D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin\mysqlcheck.exe

Error: Failed while fetching Server version! Could be due to unauthorized access.

FATAL ERROR: Upgrade failed

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysql_upgrade.exe -u root -p --force

Enter password: ****

Looking for 'mysql.exe' as: D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin\mysql.exe

Looking for 'mysqlcheck.exe' as: D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin\mysqlcheck.exe

Error: Failed while fetching Server version! Could be due to unauthorized access.

FATAL ERROR: Upgrade failed

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysql

服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start MySQL

服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start MySQL56

服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --install

Service successfully installed.

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysqk

服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start Mysql

MySQL 服务正在启动 .

MySQL 服务无法启动。

系统出错。

发生系统错误 1067。

进程意外终止。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysql

MySQL 服务正在启动 .

MySQL 服务无法启动。

系统出错。

发生系统错误 1067。

进程意外终止。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysql

MySQL 服务正在启动 .

MySQL 服务无法启动。

系统出错。

发生系统错误 1067。

进程意外终止。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysql

MySQL 服务正在启动 .

MySQL 服务已经启动成功。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start stop

服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net stop Mysql

MySQL 服务正在停止.

MySQL 服务已成功停止。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysql.exe --console --skip-grant-tanles --shard-memory

mysql.exe: unknown option '--console'

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysql.exe  --skip-grant-tanles

mysql.exe: unknown option '--skip-grant-tanles'

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysqld --skip-grant-tables

2025-04-23 09:58:56 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled

2025-04-23 09:58:56 0 [Note] mysqld (mysqld 5.6.49) starting as process 5572 ...

^C

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start stop

服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>net start mysql

MySQL 服务正在启动 .

MySQL 服务已经启动成功。

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>mysql -uroot -p2020

Warning: Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.6.49 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit

Bye

D:\mysql-5.6.49-winx64\mysql-5.6.49-winx64\bin>

实际错误为data文件下缺少内容,缺少的文件从原下载路径中复制粘贴,

Win+R,cmd然后修改密码,即完成

选中的文件为缺少的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值