473,396 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Error 1067 when starting as service, no problem in standalone

Please note, I already posted this on the MySQL official forum, but received
no response. I thought I'd try again in another location. My apologies to
anyone reading this twice...

Despite everything I've tried, I cannot get MySQL to start as a Windows
service. However, I AM able to get it started via the mysqld-nt --console
command.

Here is my (funky) setup:

- MySQL 5.0 on Windows XP SP2 development server
- datadir in my.ini file set to network path Z:/path/to/mysql/ (note the
forward slashes)
- This network drive is actually an external hard drive (via firewire) on my
workstation PC

Permissions are set accordingly:
- User "MyUserAccount" exists on BOTH server and workstation (with identical
passwords)
- MySQL service is set to run as "MyUserAccount"
- "MyUserAccount" has FULL permissions to access the local MySQL basedir and
the network datadir path

In short, I can execute:

mysqld-nt --console (with or without --standalone)

.... to get the server started. I enter the mysql command line and can see
all my databases from my network share. I then can verify through Task
Manager that the mysqld-nt service is running under the "MyUserAccount" user
(this is the default Windows user for my server).

I shutdown with:

mysqladmin -u root -p shutdown

Now I try to start the service using:

- net start mysql or...
- Windows Services console

.... and receive the following error:

"Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly."

Checking Windows Event Viewer gives me foggy error messages such as:

"Aborting" and...
"The MySQL service terminated unexpectedly. It has done this x time(s)."
I will gladly provide more information if needed, but I am completely
stumped at this point. Many thanks to any who can help me out with this.

- Kevin
Feb 6 '06 #1
8 55646
"Kevin D." <cr**************@gmail.com> wrote in message
news:4PJFf.55710$V.32341@fed1read04...
"Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly."

Checking Windows Event Viewer gives me foggy error messages such as:

"Aborting" and...
"The MySQL service terminated unexpectedly. It has done this x time(s)."


I find little useful information for MySQL recorded in the Windows Event
log. You should look in the MySQL server error log for better information.
This error log can be found under the MySQL data directory, as a filename
"hostname.err" where hostname is the name of your host on which MySQL runs.

Regards,
Bill K.
Feb 6 '06 #2
thanks for the reply!

that's part of my problem, no hostname.err log file is created since the
datadir is located on the remote drive which, for some odd reason, mysql
won't connect to when running as a windows service (yet has no problem
connecting to it when run in --console --standalone mode)


"Bill Karwin" <bi**@karwin.com> wrote in message
news:ds*********@enews4.newsguy.com...
"Kevin D." <cr**************@gmail.com> wrote in message
news:4PJFf.55710$V.32341@fed1read04...
"Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly."

Checking Windows Event Viewer gives me foggy error messages such as:

"Aborting" and...
"The MySQL service terminated unexpectedly. It has done this x time(s)."


I find little useful information for MySQL recorded in the Windows Event
log. You should look in the MySQL server error log for better
information. This error log can be found under the MySQL data directory,
as a filename "hostname.err" where hostname is the name of your host on
which MySQL runs.

Regards,
Bill K.

Feb 6 '06 #3
Kevin D. wrote:
Please note, I already posted this on the MySQL official forum, but received
no response. I thought I'd try again in another location. My apologies to
anyone reading this twice...

Despite everything I've tried, I cannot get MySQL to start as a Windows
service. However, I AM able to get it started via the mysqld-nt --console
command.

Here is my (funky) setup:

- MySQL 5.0 on Windows XP SP2 development server
- datadir in my.ini file set to network path Z:/path/to/mysql/ (note the
forward slashes)
- This network drive is actually an external hard drive (via firewire) on my
workstation PC

Permissions are set accordingly:
- User "MyUserAccount" exists on BOTH server and workstation (with identical
passwords)
- MySQL service is set to run as "MyUserAccount"
- "MyUserAccount" has FULL permissions to access the local MySQL basedir and
the network datadir path

In short, I can execute:

mysqld-nt --console (with or without --standalone)

... to get the server started. I enter the mysql command line and can see
all my databases from my network share. I then can verify through Task
Manager that the mysqld-nt service is running under the "MyUserAccount" user
(this is the default Windows user for my server).

I shutdown with:

mysqladmin -u root -p shutdown

Now I try to start the service using:

- net start mysql or...
- Windows Services console

... and receive the following error:

"Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly."

Checking Windows Event Viewer gives me foggy error messages such as:

"Aborting" and...
"The MySQL service terminated unexpectedly. It has done this x time(s)."
I will gladly provide more information if needed, but I am completely
stumped at this point. Many thanks to any who can help me out with this.

- Kevin


I had a few services I needed to configure to retrieve data from the
net... however I would not recommend doing this with MySQL table data.
Perhaps you can explain on why you have chosen this setup as there might
be a different, more appropriate way.

Now to your question. As windows starts it also starts the services,
this is done before a user is signed in. Drive mappings are user
dependent and are made when a user logs in, so the drive mappings are
not available at the time the MySQL service is started. Therefor it
works when you are logged in and manually start the service, but not
when you automatically start it before you log in.

It might work if you don't use the mapped drive but use the full UNC
path to the datadir, those paths are usually resolved by the DNS and are
available to windows at the time it starts the services. If you don't
have DNS or name resolving you might want to use the IP number, so either:

\\server\path\to\mysql\datadir

or

\\ip-number\path\to\mysql\datadir

Good luck, but I am really curious if you really need this setup.

Jonathan
Feb 6 '06 #4
Kevin D. wrote:
thanks for the reply!

that's part of my problem, no hostname.err log file is created since the
datadir is located on the remote drive which, for some odd reason, mysql
won't connect to when running as a windows service (yet has no problem
connecting to it when run in --console --standalone mode)


"Bill Karwin" <bi**@karwin.com> wrote in message
news:ds*********@enews4.newsguy.com...
"Kevin D." <cr**************@gmail.com> wrote in message
news:4PJFf.55710$V.32341@fed1read04...
"Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly."

Checking Windows Event Viewer gives me foggy error messages such as:

"Aborting" and...
"The MySQL service terminated unexpectedly. It has done this x time(s)."

I find little useful information for MySQL recorded in the Windows Event
log. You should look in the MySQL server error log for better
information. This error log can be found under the MySQL data directory,
as a filename "hostname.err" where hostname is the name of your host on
which MySQL runs.

Regards,
Bill K.


Please don't top post the next time, as it messes up the order of the
conversation, normal order is to post your answers at the bottom or in
between to keep the logic of a conversation.

Jonathan
Feb 6 '06 #5
"Kevin D." <cr**************@gmail.com> wrote in message
news:XZNFf.55742$V.31108@fed1read04...
thanks for the reply!

that's part of my problem, no hostname.err log file is created since the
datadir is located on the remote drive which, for some odd reason, mysql
won't connect to when running as a windows service (yet has no problem
connecting to it when run in --console --standalone mode)


That probably explains why MySQL won't start as a service, if its data dir
is on a remote drive and it doesn't like it. This behavior might be by
design!

It's a very bad idea to locate the data dir on a remote drive. If the
network between your server host and your remote drive host has any hiccup,
you'll get data corruption. Plus the traffic is transmitted unencrypted.

Relocate the data dir to a local drive and I think your service startup
issue will be resolved.
Use the remote drive only to store database backups, not the live database.

Regards,
Bill K.
Feb 6 '06 #6

"Jonathan" <jo******@heelal.nl> wrote in message
news:43**********************@text.nova.planet.nl. ..
Kevin D. wrote:
Please note, I already posted this on the MySQL official forum, but
received no response. I thought I'd try again in another location. My
apologies to anyone reading this twice...

Despite everything I've tried, I cannot get MySQL to start as a Windows
service. However, I AM able to get it started via the mysqld-nt --console
command.

Here is my (funky) setup:

- MySQL 5.0 on Windows XP SP2 development server
- datadir in my.ini file set to network path Z:/path/to/mysql/ (note the
forward slashes)
- This network drive is actually an external hard drive (via firewire) on
my workstation PC

Permissions are set accordingly:
- User "MyUserAccount" exists on BOTH server and workstation (with
identical passwords)
- MySQL service is set to run as "MyUserAccount"
- "MyUserAccount" has FULL permissions to access the local MySQL basedir
and the network datadir path

In short, I can execute:

mysqld-nt --console (with or without --standalone)

... to get the server started. I enter the mysql command line and can see
all my databases from my network share. I then can verify through Task
Manager that the mysqld-nt service is running under the "MyUserAccount"
user (this is the default Windows user for my server).

I shutdown with:

mysqladmin -u root -p shutdown

Now I try to start the service using:

- net start mysql or...
- Windows Services console

... and receive the following error:

"Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly."

Checking Windows Event Viewer gives me foggy error messages such as:

"Aborting" and...
"The MySQL service terminated unexpectedly. It has done this x time(s)."
I will gladly provide more information if needed, but I am completely
stumped at this point. Many thanks to any who can help me out with this.

- Kevin


I had a few services I needed to configure to retrieve data from the
net... however I would not recommend doing this with MySQL table data.
Perhaps you can explain on why you have chosen this setup as there might
be a different, more appropriate way.

Now to your question. As windows starts it also starts the services, this
is done before a user is signed in. Drive mappings are user dependent and
are made when a user logs in, so the drive mappings are not available at
the time the MySQL service is started. Therefor it works when you are
logged in and manually start the service, but not when you automatically
start it before you log in.

It might work if you don't use the mapped drive but use the full UNC path
to the datadir, those paths are usually resolved by the DNS and are
available to windows at the time it starts the services. If you don't have
DNS or name resolving you might want to use the IP number, so either:

\\server\path\to\mysql\datadir

or

\\ip-number\path\to\mysql\datadir

Good luck, but I am really curious if you really need this setup.

Jonathan

that's a good idea to try the full UNC path instead although i don't think
that's the problem since i am not performing my testing during windows
startup but only after login and all drives are connected (remember too that
this network share CAN be used as the mysql datadir when i start mysql via
'mysqld-nt --console')

to explain why i want to set it up this way (and i've been quickly changing
my mind over the last week in order to finally relieve my headaches)...

my environment is for testing/development only, i'm a web developer working
from home and i just purchased an old compaq to use as my server (got tired
of running all the required services on my main workstation, plus i want to
expose this server to the internet so i can "stage" the websites to my
clients during development)

in short, i don't trust the compaq HD for keeping my data since it's quite
old, etc.

i currently keep all my development files (everything from photoshop designs
to html/php files and all mysql tables) on an external hard drive connected
to my workstation (i then do backups from my external drive down to my
workstation drive, etc.)

i like to keep all my development files in a single location for portability
(in case i need to work remotely i just bring the drive) and ease of backup,
etc.

at this point i am willing to keep trying this configuration but it seems to
make more sense to just move the datadir to the same physical drive as my
mysql basedir (this has been tested and does work, btw) and perform nightly
dumps to my external drive via the network share

now i'm wondering, is it also a bad idea to run apache on my server and have
its document root set to this external drive too?

sorry for being long-winded (and for top-posting earlier)... hope this gives
everyone some more insight

- kevin

Feb 6 '06 #7
"Kevin D." <cr**************@gmail.com> wrote in message
news:%vPFf.55749$V.12616@fed1read04...
my environment is for testing/development only, i'm a web developer
working from home and i just purchased an old compaq to use as my server . . . in short, i don't trust the compaq HD for keeping my data since it's quite
old, etc.
If you have doubts about the stability of the hard drive in the Compaq, it's
a pretty inexpensive task to replace the drive. Or replace the whole
machine!
now i'm wondering, is it also a bad idea to run apache on my server and
have its document root set to this external drive too?


The risk of data corruption is less, since typically files used by Apache
are read-only. But I would still not do this. For instance, you said you
plan to make your server open to external clients. What happens when
someone tries to preview some of your staged websites, when your workstation
is off?

Regards,
Bill K.
Feb 6 '06 #8

"Bill Karwin" <bi**@karwin.com> wrote in message
news:ds*********@enews4.newsguy.com...
"Kevin D." <cr**************@gmail.com> wrote in message
news:%vPFf.55749$V.12616@fed1read04...
my environment is for testing/development only, i'm a web developer
working from home and i just purchased an old compaq to use as my server

. . .
in short, i don't trust the compaq HD for keeping my data since it's
quite old, etc.


If you have doubts about the stability of the hard drive in the Compaq,
it's a pretty inexpensive task to replace the drive. Or replace the whole
machine!
now i'm wondering, is it also a bad idea to run apache on my server and
have its document root set to this external drive too?


The risk of data corruption is less, since typically files used by Apache
are read-only. But I would still not do this. For instance, you said you
plan to make your server open to external clients. What happens when
someone tries to preview some of your staged websites, when your
workstation is off?

Regards,
Bill K.


points noted, but my workstation stays on all the time... i'm just trying to
off-load some cpu power from it and dedicate the "server" tasks to, well,
the server :)

i may have to consider moving all my web and db files to the server, and
just performing nightly backups onto the external drive
Feb 6 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Patrice FRITSCH | last post by:
I'm trying to run a batch file from an asp page using WScript.Shell object. Dim oWSH set oWSH= Server.CreateObject("WScript.Shell") call oWSH.Run("cmd.exe /c " & szCmd , 0, true) szCmd...
2
by: Sara T. | last post by:
I always found that web page written by ASP.NET (VB.NET) generate error when starting at the first times. If I click refresh button on the IE again, it can work as well. What's wrong ? Again...
0
by: Kyle Baley | last post by:
I'm developing an MCMS web service and am getting a 401 unauthorized error when I try to consume it from a client. It works fine when I use the test harness to navigate to the asmx file directly....
1
by: DotNetMania | last post by:
i'm woking with webservice ... how should the client do when webservice service is down. what kind of exception would occur..? when my testing it always wait server's signal... best...
0
by: Meenakshi Nagasundaram | last post by:
hi, I have developed a Windows service application. I have used the deployment project to installed this service in services.msc. After restarting the machine, I tried to start the service. It...
4
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the...
0
by: =?Utf-8?B?QW5keSBZdQ==?= | last post by:
Hi, I'm trying to return exceptions from a WCF Service using FaultExceptions. I got the service compiled and running. But I get an error while adding a service reference to it. The error reads: "...
1
by: TechnoAtif | last post by:
Could not start the mysql service on localcomputer Error 1067:The process terminated unexpectedly. ------------------------------------------------------------------------------ Hi All. I 'm...
1
by: =?Utf-8?B?S2F1c2hhbCBNZWh0YQ==?= | last post by:
Hi, Could you let me know what exactly happens when web service provider receives request from the client (from system perspective, like threading and all) ? Also, how does the web service...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.