Error help

[expired user #8513]'s profile image [expired user #8513] posted 9 years ago in General Permalink
[Window Title]
Error

[Content]
SQL Error (2003) in statement #0: Can't connect to MySQL server on 'localhost' (10061)

[OK]

[Footer]
Find some help on this error
jfalch's profile image jfalch posted 9 years ago Permalink
winsock error code 10061 means the client (heidisql) cannot access a mysql server on localhost. Is a mysql server running on your pc ?
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
Yes
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
And it worked fine for a month or two but the game I'm hosting the server for updated yesterday but I didn't think that would give me the problem with Heidi not connecting
jfalch's profile image jfalch posted 9 years ago Permalink
is this a windows or linux host ?
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
Windows
jfalch's profile image jfalch posted 9 years ago Permalink
please call up the task manager and check that mysqld.exe is realy running. Reason: 10061 means basically "there is nothing there" (ie no server found).
The update could have introduced a database change that does prevent the mysql server from starting up; or (unlikely) it could have modified your firewall rulkes so that port 3306 is no longe accessible.
Also check the mysql server's log - its in mysql\data\ usually, and named {machine_name}.err - unless the mysql configuration file (my.ini in mysql or windows directory) specifies another data directory (line starting datadir=).
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
Thanks man ill let you know how it goes after I get off work
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
so I don't see anything in the task manager under apps or processes called MySQL.exe and I'm having trouble finding the server log. If you could be more specific or maybe I just need to uninstall everything and start fresh?
BubikolRamios's profile image BubikolRamios posted 9 years ago Permalink
start/control pannel/administrative tools/services

search for mysql, see if it is running, if not right click, start
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
ok I'm running windows 8 so things are way different
but I can get start, control panel
no administrative tools exists
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
wait I found it
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
---------------------------
Services
---------------------------
Windows could not start the MySQL service on Local Computer.



Error 1067: The process terminated unexpectedly.


---------------------------
OK
---------------------------
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
I found the services and try to start the MySQL one because in the status column is blank. The last post is the error messaged associated with me trying to start MySQL service in that window BubikolRamios got me too
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
thanks again for everything
jfalch's profile image jfalch posted 9 years ago Permalink
1067 usually means the mysql server encountered an error during startup, and therefore terminated again. look into the windows system event log to see details. There are a lot of messages in there; look for recent messages having a "source" of "MySQL" or similar. One of these should tell you why the mysql server would not start.
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
Log Name: System
Source: Service Control Manager
Date: 11/17/2014 8:46:15 PM
Event ID: 7034
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: Gamerzone
Description:
The MySQL service terminated unexpectedly. It has done this 5 time(s).
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7034</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2014-11-18T01:46:15.612908900Z" />
<EventRecordID>6313</EventRecordID>
<Correlation />
<Execution ProcessID="792" ThreadID="3612" />
<Channel>System</Channel>
<Computer>Gamerzone</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">MySQL</Data>
<Data Name="param2">5</Data>
<Binary>4D007900530051004C000000</Binary>
</EventData>
</Event>
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
that's all I get out of that I didn't see anything saying why it isn't working just that it isn't lol
jfalch's profile image jfalch posted 9 years ago Permalink
there should also be a mysql log file direcly produced by the mysql server, but it's somewhat hard to find.
-if you know where mysql lives (eg c:\Program files\mysql or c:\Program files (x86)\mysql), open that directory in explorer.
(if you dont know, open a command window: windows button+R, type cmd.exe +Enter into run window, type sc qc mysql +Enter into command window - will show where the mysqld.exe is, mysql directory is one level up from there.)
- in the mysql directory there dshould be the mysql configuration file; on windows it is usually called my.ini. (If there are several such files with suffixes (my-large.ini, my-huge.ini etc), ignore them, just use my.ini. if there should not be a my.ini there (unlikely), check c:\windows for it).
- open this file in notepad; look for a line starting datadir= ; this line tells wher mysql's data directory is.
- open this directory in explorer. there should be a file named {computername}.err, where {computername} is the name of your computer. (if not found, look for {computername}.log, mysql.err, mysql.log).
- open this file in notepad. it is the mysql server log file, and should contain more info on what happened.
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
141020 15:14:05 InnoDB: The InnoDB memory heap is disabled
141020 15:14:05 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141020 15:14:05 InnoDB: Compressed tables use zlib 1.2.3
141020 15:14:05 InnoDB: Initializing buffer pool, size = 1023.0M
141020 15:14:05 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
141020 15:14:05 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
141020 15:14:06 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 50 MB
InnoDB: Database physically writes the file full: wait...
141020 15:14:06 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 50 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: 127 rollback segment(s) active.
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
141020 15:14:08 InnoDB: Waiting for the background threads to start
141020 15:14:09 Percona XtraDB (http://www.percona.com) 5.5.38-MariaDB-35.2 started; log sequence number 0
141020 15:14:09 [Note] Plugin 'FEEDBACK' is disabled.
141020 15:14:09 [Note] Server socket created on IP: '::'.
141020 15:14:09 [Note] Event Scheduler: Loaded 0 events
141020 15:14:09 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: ready for connections.
Version: '5.5.39-MariaDB' socket: '' port: 3306 mariadb.org binary distribution
141114 0:17:54 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: Normal shutdown

141114 0:17:55 [Note] Event Scheduler: Purging the queue. 0 events
141114 0:17:58 InnoDB: Starting shutdown...
141114 17:19:57 InnoDB: The InnoDB memory heap is disabled
141114 17:19:57 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141114 17:19:57 InnoDB: Compressed tables use zlib 1.2.3
141114 17:19:57 InnoDB: Initializing buffer pool, size = 128.0M
141114 17:19:57 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 52428800 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
InnoDB: Possible causes for this error:
(a) Incorrect log file is used or log file size is changed
(b) In case default size is used this log file is from 10.0
(c) Log file is corrupted or there was not enough disk space
In case (b) you need to set innodb_log_file_size = 48M
141114 17:19:57 [ERROR] Plugin 'InnoDB' init function returned error.
141114 17:19:57 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141114 17:19:57 [Note] Plugin 'FEEDBACK' is disabled.
141114 17:19:57 [ERROR] Unknown/unsupported storage engine: InnoDB
141114 17:19:57 [ERROR] Aborting

141114 17:19:57 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: Shutdown complete

141116 23:47:57 InnoDB: The InnoDB memory heap is disabled
141116 23:47:57 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141116 23:47:57 InnoDB: Compressed tables use zlib 1.2.3
141116 23:47:57 InnoDB: Initializing buffer pool, size = 128.0M
141116 23:47:57 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 52428800 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
InnoDB: Possible causes for this error:
(a) Incorrect log file is used or log file size is changed
(b) In case default size is used this log file is from 10.0
(c) Log file is corrupted or there was not enough disk space
In case (b) you need to set innodb_log_file_size = 48M
141116 23:47:57 [ERROR] Plugin 'InnoDB' init function returned error.
141116 23:47:57 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141116 23:47:57 [Note] Plugin 'FEEDBACK' is disabled.
141116 23:47:58 [ERROR] Unknown/unsupported storage engine: InnoDB
141116 23:47:58 [ERROR] Aborting

141116 23:47:58 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: Shutdown complete

141116 23:51:30 InnoDB: The InnoDB memory heap is disabled
141116 23:51:30 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141116 23:51:30 InnoDB: Compressed tables use zlib 1.2.3
141116 23:51:30 InnoDB: Initializing buffer pool, size = 128.0M
141116 23:51:30 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 52428800 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
InnoDB: Possible causes for this error:
(a) Incorrect log file is used or log file size is changed
(b) In case default size is used this log file is from 10.0
(c) Log file is corrupted or there was not enough disk space
In case (b) you need to set innodb_log_file_size = 48M
141116 23:51:30 [ERROR] Plugin 'InnoDB' init function returned error.
141116 23:51:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141116 23:51:30 [Note] Plugin 'FEEDBACK' is disabled.
141116 23:51:30 [ERROR] Unknown/unsupported storage engine: InnoDB
141116 23:51:30 [ERROR] Aborting

141116 23:51:30 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: Shutdown complete

141116 23:52:25 InnoDB: The InnoDB memory heap is disabled
141116 23:52:25 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141116 23:52:25 InnoDB: Compressed tables use zlib 1.2.3
141116 23:52:25 InnoDB: Initializing buffer pool, size = 128.0M
141116 23:52:25 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 52428800 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
InnoDB: Possible causes for this error:
(a) Incorrect log file is used or log file size is changed
(b) In case default size is used this log file is from 10.0
(c) Log file is corrupted or there was not enough disk space
In case (b) you need to set innodb_log_file_size = 48M
141116 23:52:25 [ERROR] Plugin 'InnoDB' init function returned error.
141116 23:52:25 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141116 23:52:25 [Note] Plugin 'FEEDBACK' is disabled.
141116 23:52:25 [ERROR] Unknown/unsupported storage engine: InnoDB
141116 23:52:25 [ERROR] Aborting

141116 23:52:25 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: Shutdown complete

141117 20:46:10 InnoDB: The InnoDB memory heap is disabled
141117 20:46:10 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141117 20:46:10 InnoDB: Compressed tables use zlib 1.2.3
141117 20:46:10 InnoDB: Initializing buffer pool, size = 128.0M
141117 20:46:10 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 52428800 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
InnoDB: Possible causes for this error:
(a) Incorrect log file is used or log file size is changed
(b) In case default size is used this log file is from 10.0
(c) Log file is corrupted or there was not enough disk space
In case (b) you need to set innodb_log_file_size = 48M
141117 20:46:10 [ERROR] Plugin 'InnoDB' init function returned error.
141117 20:46:10 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141117 20:46:10 [Note] Plugin 'FEEDBACK' is disabled.
141117 20:46:10 [ERROR] Unknown/unsupported storage engine: InnoDB
141117 20:46:10 [ERROR] Aborting

141117 20:46:10 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: Shutdown complete

[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
I tried reading through that file to see if could fix it. Alas I don't understand so I posted that lengthy garbage that I will probably never understand. With hope that you'll keep helping me =) btw thanks again. I'm going to thank you until you tell me to stop. Do you have paypal? I'll send you some money for time and effort. Thanks again!
jfalch's profile image jfalch posted 9 years ago Permalink
It basically says that the mysql server could not start up ([ERROR] Aborting) because its main storage engine (InnoDB) has a problem with its log file (.\ib_logfile0): the real log file size on disk is different to what is specified in the mysql.ini (or .cnf ) file. Probably the upgrade procedure you mentioned has changed something here, and now it does not work any longer.

Since the log file had just been created (top of the log "Log file .\ib_logfile0 did not exist: new to be created") its structure should be Ok, it is most probably only the size difference that causes the error.

You should have located the mysql.ini (or .cnf) file by now using the procedure i described above. Open the ini file with notepad, and look for an entry starting innodb_log_file_size = or #innodb_log_file_size = . If there is a '#' as first char remove it; then change the part after the '=' to 50M, result should look like this
innodb_log_file_size = 50M
then save and close the file; then try to start mysql server again (cmd window (cf above): sc start mysql). after say 30 seconds a process named mysqld.exe should be visible in task manager, and your game server should be able to run again.

if not, post last part of log again (starting at last line containing "InnoDB: The InnoDB memory heap is disabled").

it is not necessary to send money, i just happen to have some free time on my hands. however, advice: if you want to run a gaming server that critically depends on a running database server, you should have a person on hand that could diagnose and fix said database server if it chooses to become inoperational... your game clients will thank you for that, because it minimises technical downtimes.

good luck!
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
in the my.ini file the innodb_log_file_size is already set to 50M and still isn't working. and the game server is only for a small community of 3 players including myself. I just happen to the be on with the best machine and the most network savvy just not savvy enough lol. but here is the last part of the log again.

141119 23:00:38 InnoDB: The InnoDB memory heap is disabled
141119 23:00:38 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141119 23:00:38 InnoDB: Compressed tables use zlib 1.2.3
141119 23:00:38 InnoDB: Initializing buffer pool, size = 128.0M
141119 23:00:38 InnoDB: Completed initialization of buffer pool
InnoDB: Error: log file .\ib_logfile0 is of different size 0 52428800 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
InnoDB: Possible causes for this error:
(a) Incorrect log file is used or log file size is changed
(b) In case default size is used this log file is from 10.0
(c) Log file is corrupted or there was not enough disk space
In case (b) you need to set innodb_log_file_size = 48M
141119 23:00:38 [ERROR] Plugin 'InnoDB' init function returned error.
141119 23:00:38 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141119 23:00:38 [Note] Plugin 'FEEDBACK' is disabled.
141119 23:00:39 [ERROR] Unknown/unsupported storage engine: InnoDB
141119 23:00:39 [ERROR] Aborting

141119 23:00:39 [Note] C:\Program Files\MariaDB 5.5\bin\mysqld.exe: Shutdown complete

It looks like the log is telling me to change the size to 48M. The more time I spend on this the better understanding I'm getting. You can now include teaching experience on your resume lol. Thanks again man
[expired user #8513]'s profile image [expired user #8513] posted 9 years ago Permalink
Tried changing the log file size to 48M didn't work XD
jfalch's profile image jfalch posted 9 years ago Permalink
innodb obviously does not "get" your ini change; it still complains about real log size =50M, .cnf size =5M which seems to indicate it did not read the modified file.
are you sure you removed an initial # from the innodb_log_file_size = line ?
if there is no starting '#', then mysql is possibly using a different configuration file than the one you have modified. currently i dont have time to find out how to tell which one.. perhaps tomorrow.
jfalch's profile image jfalch posted 9 years ago Permalink
open a command box; use command

reg query "HKLM\SYSTEM\CurrentControlSet\services\MySQL" /v ImagePath


this should return the "command line" that starts the mysql server, a parameter --defaults-file gives the configuration file used.

Please login to leave a reply, or register at first.