MySQL Server – Fixing Launch Issues on Windows 7

innodbMySQLwindows

I have been using MySQL as a windows service successfully on my windows 7 machine for perhaps a year. It has always worked fine. Here are the steps which I think caused it to no longer launch:

1.) My computer ran out of battery power and shut down automatically 
    while the MySQL windows service was running.
2.) When I tried to restart the computer, it took a very long time 
    to restore the windows session.  A dos prompt said it was 
    restoring the windows session, and the fan was running very 
    loudly.  
3.) After perhaps 10 minutes of this, I turned off the computer 
    forcibly by using the power switch.  
4.) When I rebooted the computer, the dos prompt told me that 
    the previous attempt to restore the windows session failed, 
    and asked if I wanted to continue loading windows without 
    restoring the previous session.  I said yes.
5.) When I tried to launch the MySQL windows service, I got the 
    following dialog box indicating error 1067:   

6.) I then tried to load MySQL from cmd.exe in order to see the  
    error logs, and I got the following output which indicates  
    that it cannot read/write:  

How can I resolve this problem?

Here are the contents of my.ini:

[client]
no-beep
port=3306
[mysql] 
default-character-set=utf8
[mysqld]
port=3306
datadir="C:/ProgramData/MySQL/MySQL Server 5.6/data\"
character-set-server=utf8
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
log-output=NONE
general-log=0
general_log_file="USER-PC.log"
slow-query-log=0
slow_query_log_file="USER-PC-slow.log"
long_query_time=10
log-error="USER-PC.err"
max_connections=100
query_cache_size=0
table_open_cache=2000
tmp_table_size=51M
thread_cache_size=9
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=100M
key_buffer_size=8M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=100M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=4M
innodb_buffer_pool_size=305M
innodb_log_file_size=100M
innodb_thread_concurrency=9
innodb_autoextend_increment=64M
innodb_buffer_pool_instances=8
innodb_concurrency_tickets=5000
innodb_old_blocks_time=1000
innodb_open_files=300
innodb_stats_on_metadata=0
innodb_file_per_table=1
innodb_checksum_algorithm=0
back_log=70
flush_time=0
join_buffer_size=256K
max_allowed_packet=4M
max_connect_errors=100
open_files_limit=4110
query_cache_type=0
sort_buffer_size=256K
table_definition_cache=1400
binlog_row_event_max_size=8K
sync_master_info=10000
sync_relay_log=10000
sync_relay_log_info=10000

EDIT:

I then restarted cmd.exe as an administrator per Rolando's advice, and got the following results, which indicate that windows cannot find a previous session for the MySQL service. Then cmd.exe remains hung up indefinitely without returning a user prompt:


SECOND EDIT:

I then did both of Rolando's suggestions from his edited response, and got the following results indicating that the log sequence numbers are out of sync with one another, which would seem to be the result of the failed restart of windows.


THIRD EDIT:

Below is the result of telling cmd.exe to echo the PATH variable:


FOURTH EDIT:

Here are results of running dir on the data directory:

Best Answer

I just noticed that you are at the Windows Command Line. You are trying to launch MySQL.

You cannot start MySQL because you are not an Administrator.

Please Open CMD.EXE as an Administrator. Then, you can run

  • net start MySQL56_1
  • mysqld --console

According to the latest update, mysqld is running just fine. That's because it says

mysqld: ready for connecitons

A prompt will not return to you.

You can now open another Command Line session and login using the mysql client.

UPDATE 2014-07-28 17:51 EDT

You need to run the following:

cd C:\Program Files\MySQL\MySQL Server 5.6\bin
mysqld --console

UPDATE 2014-07-28 18:28 EDT

When you ran mysqld --console you were not using the my.ini

Call it like this

mysqld -defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" --console

If you want the prompt to come back, run this

start mysqld -defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" --console

UPDATE 2014-07-28 18:48 EDT

My suggestion from the Chat Session

cd "C:\ProgramData\MySQL\MySQL Server 5.6\data"
move ib_logfile* ..
net start MySQL 56_1

Give the service time to regenerate the Log Files, and you should be good to go.