This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running mysql as a service ...


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Igor Peshansky wrote:
> On Tue, 19 Jun 2007, Igor Peshansky wrote:
> 
>> <http://cygwin.com/acronyms/#PCYMTWLL>.  Thanks.
>>
>> On Sat, 16 Jun 2007, "Tilman SchrÃder" wrote:
>>
>>> Hello everyone,
>>>
>>> I just spend some frunstrating hours on figuring out how to run a
>>> self-compiled cygwin mysql daemon as a service (win xp).
>>>
>>> first of all:
>>> using cygrunsrv.exe did not work for me, I do not know why, the problem
>>> is that there is no error log file for cygrunsrv or i am too stupid and
>>> did not found the log file
>> Check the Windows Event Log (under "My Computer"->"Manage", or whatever
>> the Deutsche equivalent is).
>>
>> You did not tell us what command you are using to install mysql as service
>> (with cygrunsrv).  Also, you didn't provide the error you are getting from
>> cygrunsrv on the console (you must be getting something, even if it's
>> "service not started").
>>
>> Another option is to install syslog-ng and run that as a service.  Then
>> all errors will be logged wherever you configure them to be (e.g., in
>> /var/log/mysqld.log)...
>>
>>> then i tried this:
>>>
>>> C:\Programme\cygwin\bin\bash.exe -login -i -c "/usr/local/mysql/libexec/mysqlmanager.exe --run-as-service &"
>>>
>>> this command opens up 3 console windows which are being closed
>>> immediately again and after this, the mysql-server runs in the
>>> background!
>> The console windows are the consequence of the implicit -mconsole.  If you
>> compile with -mwindows instead, you'll lose the ability to display
>> messages on the console, so that's probably not a good option.
>>
>>> it's not a very good solution because this is no real
>>> service but just a command which can be put into the Autostart folder
>>> ... and now we have got a problem when more than one real windows user
>>> is logged in ...
>>>
>>> Does anyone know how to start the cygwin mysql server as a windows
>>> service ???
>>> Would be very nice if somebody knew the trick ...
>> Sure -- use cygrunsrv.  Beyond that, you need to check various permissions
>> (cygrunsrv will run as SYSTEM), and make sure the paths are in order, etc
>> (e.g., c:\cygwin\bin needs to be in the PATH unless mysqld is in /bin).
> 
> Forgot to mention: cygrunsrv is a wrapper to run a non-service (console)
> program as a service.  That means that you'll need to put mysqld in
> non-daemon mode.  Either that, or explore the --pid option of cygrunsrv
> (read the man page and the description in the User's Guide).
> 	Igor

Thank you for your tips, but I changed the way to achieve my goal ...
I ported the app to fpdf, a free pdf creation class for php which does
not require any external library. Then I converted the pdf to postscript
using ghostscript and then sending the postscript-file to the printer
using the program printfile (http://www.lerup.com/printfile/) ... I've
had enough problems with cygwin and I had lots of problems with
ghostscript+printfile, too, I am happy now because it just works and
will work for the next 5 years ...

Perhaps somebody has got a similar problem and finds this thread :)

Bye, Tilman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGd/0ZxWHJ8ml5laIRAtorAKCLQIw/JghKOGWyfniISwAcHoVkPgCdGm09
9HVAdqj4iGXRZNpkxMpw/ZE=
=xT5v
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]