2

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:

Glorfindel
2,2095 gold badges19 silver badges26 bronze badges
asked Jul 28, 2014 at 20:23
6
  • Part of the Error Message says Can't create test file C:\Program Files\MySQL\MySQL Server 5.6\data\User-PC.lower-test. Is Drive C: full ? Is the Disk ReadOnly ? Do you have disk errors ? Commented Jul 28, 2014 at 21:16
  • @RolandoMySQLDBA I just edited my original post above to indicate that a failed restart of windows might be to blame. The disk is not full. The disk is not read only. I have not noticed any disk errors, but I also do not know how to check for disk errors. Do my edits above help you pinpoint the problem/solution? Commented Jul 28, 2014 at 21:19
  • The messages indicate you created new InnoDB log files. So, you are not running the mysqld.exe in the proper manner. Go to ControlPanel -> AdminstrativeTools -> Services. Scroll down to MySQL56_1 service. Right-click on it and Click Properties. What is the Path to executable ? Commented Jul 28, 2014 at 21:45
  • @RolandoMySQLDBA Path to executable is "C:/Program Files/MySQL/MySQL Server 5.6/bin\mysqld" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.6\my.ini" MySQL56_1 but does my second edit above direct us to another approach to solving the problem? What about the log sequence numbers? Commented Jul 28, 2014 at 21:47
  • Goto Command Line and run C:\> echo %PATH% and post it please. Commented Jul 28, 2014 at 21:50

1 Answer 1

1

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.

answered Jul 28, 2014 at 21:23
10
  • Please see the new screen shot that resulted from running cmd.exe as an administrator. Does this help you pinpoint the problem and solution? Commented Jul 28, 2014 at 21:33
  • I added a second edit to my original posting above indicating the results of doing both of your suggested commands in sequence. It seems that the log sequence numbers are out of alignment due to the failed restart of windows. How can I fix this? Commented Jul 28, 2014 at 21:44
  • Don't repair anything yet. Look at the message again. It's recreating Log Files. Your log files are supposed to 100MB (from the my.ini) not the default 48MB. Commented Jul 28, 2014 at 21:56
  • Please run cd C:\Program Files\MySQL\MySQL Server 5.6\data. Then run dir and post that. Commented Jul 28, 2014 at 21:58
  • It is giving me The file name, directory name, or volume label syntax is incorrect, even though I surround the cd 'C:\Program Files\MySQL\MySQL Server 5.6\bin' in single quotes and tick marks in different attempts. Commented Jul 28, 2014 at 22:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.