Zend Core Mysql Error
I’ve had this error more than once. On a debian virtual machine, with Zend Core installed, and when mysql doesn’t restart when the machine reboots. It looks something like this:
debian:/usr/local/Zend/mysql/bin# ./mysqld
080627 12:31:16 [ERROR] Can't find messagefile '/usr/local/mysql/share/mysql/english/errmsg.sys'
080627 12:31:16 [ERROR] Aborting
This is for two reasons. First: you need to be up one level of directory to be able to run these commands. Some errors will tell you that but this one doesn’t. Secondly, you need to use the mysqld_safe command.
debian:/usr/local/Zend/mysql# bin/mysqld_safe
Starting mysqld daemon with databases from /usr/local/Zend/mysql/data
This works for me – I have no idea if it is the prescribed method but background the process above and you’re good to go.
Woa, back up a few paces here. Zend core has its own MySQL installation? What’s wrong with the distro’s own one? At least there are init.d scripts to deal with start/stop/reload/restart so you don’t have to worry about this kind of thing.
Andrew: Is that a real name I spy? Zend Core is a *AMP stack-in-a-box, so yes it comes with its own mysql. Two mysqls in fact, just to make life more interesting. Neither you nor I are the target market for this product and my reaction was exactly the same when I first saw it :) For those who want to use PHP and not get up close and personal with it, its a nice idea. For anyone who knows what a distro is and can install mysql themselves, then there are probably more appropriate ways to get PHP!
Ah bum, my secret is out. Been to tired to think to use my alter-ego ;)
I can see it more for Windows and Mac that Linux. I think my boss has something similar on his Mac so he can simulate the running of some of one of our sites on his Mac, but he doesn’t have the PECL modules to do everything.
Andrew: I know what you mean but for a fairly default install Zend Core is fast to put in. I can happily install web servers myself but especially when I’m working with Zend Platform for a generic PHP install, its easiest just to ask Zend Platform to install Zend Core as part of its installation. I’m using this for a lot of different development environments on virtual machines on my laptop rather than anything more real or visible and it works pretty well (apart from obviously it hides some of the stuff I’d usually expect to see!)
Isn’t there an init script provided as with Zend Platform? I can’t imagine they want you to run the daemons directly.
By the way, Zend Core doesn’t come with 2 if I remember correctly. Zend Core comes with 1 (a generic one) and Zend Platform comes with 1 (a specific tuned down mysql for its internal storage).
Re: the not being a target market: it’s targeted at people that want to run php on their box but are not into sysadmin things. For dev environments it’s as useful as wamp, xamp etc.
For live environments, the installation thing is not the main selling point, that’s the autoupdater with the bugfix backport service that Zend offers.
Ivo: You are quite right, the second mysql belongs with Zend Platform rather than Zend Core. I’m sure there should be an initialisation script but I didn’t manage to find the “elegant” way to restart this service after it hadn’t come up correctly at reboot, maybe someone else knows and can tell me?