Month: September 2010

Every now and again, when installing or upgrading MySQL on Windows, mysqld will not start, and it’s not due to any changes in the config file, using some old config option, permissions, something changed/removed, or anything else. It just simply fails, when you know it should work.

If you’re lucky, you’ll at least see the “Can’t create IP socket: No such file or directory” error in the error log.

However, the above error is generated when you invoke mysqld from the command line, and not via the service.

So if you’re not seeing any error on the console, or in the error log, when starting mysql via the service, then try it from the command line, so you can perhaps get more information in the error log.

The “Can’t create IP socket: No such file or directory” error is not very specific, nor is it helpful in determining the problem (especially since this in on Windows).

However, I’ve found this can occur/or be resolved in a couple ways:

Re-download the binary (I’ve had this occur if what I downloaded got corrupted somehow)

Re-extract the binary (I’ve had this occur if the binary got corrupted during the unzip operation)

Simply try starting mysqld (or service) in a new DOS window (Strange but worked for me the last time I encountered the error, when the above 2 did not)

So next time you run into this error message, give the above a try, before you go rebooting your system, or spending a lot of time commenting out each line in your my.ini file, one-by-one, trying to chase down the offending culprit that doesn’t exist.

Numerous times now, I’ve seen people have troubles creating MySQL services on Windows manually (using ‘sc’), whether it be for mysqld itself, MySQL Proxy, or the MySQL Enterprise Monitor and/or Agent.

The proper syntax for ‘sc’ can get tricky when you have spaces in pathnames, which is very common in Windows, and the need for –defaults-file (which means two paths each potentially containing spaces).

So, if you have spaces in both your binpath and your path to –defaults-file, then the following syntax will work for you (all on a single line):

Note that you could easily use the exact same syntax to install a Windows service for the MySQL server itself (using mysqld.exe and my.ini instead, along with their correct paths). Similarly, this could be also used to create a Windows service for MySQL Proxy too. Just point binpath to mysql-proxy-svc.exe, and instead of –defaults-file=, use –proxy-lua-script= (in fact, I actually had a post on this close to a year ago, but my example only had one path that contained a space, so the above syntax was not necessary).

At any rate, the above command should output somthing similar to the following: