Jump to content

What mode should MySQL be running in when used with PHP?


NotionCommotion

Recommended Posts

My my.cnf file has three sections (mysqld, mysqld_safe, mysql).  It seems that they represent different modes which MySQL runs in.  Is this correct?  I read that some recommend running in safe mode.  Should I be if it is being used to support PHP?  I typically start MySQL as "service mysqld start" when running Centos. How should I be starting it if I want it in safe mode.
 

Link to comment
Share on other sites

They are not really modes. The options in the configuration file are divide into various groups. Each of mysql's programs has a set of groups it will look at for options.

 

mysqld is the actual executable for the mysql server. [mysqld] is it's unique group.

mysqld_safe is a wrapper script that adds a little bit of extra safety by restarting the server if it crashes and some error logging. It will look at the [mysqld_safe] group for it's options.

mysql refers to the mysql client application, not the server. It will look for options in the [mysql] group.

 

If you installed mysql using your system's package manager, it's probably already setup the service to start using whatever method is appropriate. I wouldn't worry about ensuring it uses mysqld_safe vs mysqld. All you need to look into is configuring mysql's options (ie memory limits, connections, etc.) so that it runs well for your environment

  • Like 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.