linux - init.d/mysql - Default configuration is blocking one of my instances on startup -


I am facing an issue which was spread last weekend.

One of my servers was rebooted and when the server came, a default instance of mysql was started which is configured on the installation. This port uses 3306 as the default and blocks one of my examples in the future.

How can I remove this default instance from booting and how to boot my installation in /etc/my.cnf?

I think what is happening is going to / var / lib / mysql and start an example based on some default configuration because There is not a my.cnf file present here, but I am getting this code init.d: ​​

  #display mysqld_pid_file_path = if test -z " $ basedir "then basedir = / usr bindir = / usr / bin if test -z" $ datadir "then datadir = / var / lib / mysql fi   

The my.cnf file is not visible which it is configured Connection options pulling.

My data directories change per instance and they are all specified in the /etc/my.cnf

I help with this problem Appreciate any effort spent in doing this.

Try this:

  $ my_print_defults --defaults-file = / etc / my.cnf mysqld   

This will show you what this is set for the hacka datyder according to your config file.

I have noticed that config files are confusing people in editing them or even automated tools can edit the config files and add new configurable entries. Keep in mind that if the config file has more than one line defined as datadir , then such a line is preferred in the last file.


If you have an instance of mysqld that starts automatically at boot time, I can find out when this is happening chkconfig for example Here, a command has been executed on my VM:

  $ chkconfig ... mysql 0: off 1: off2: at 3: on 4: at 5: on 6: off. .   

Numbers are 0 to 6 runlevels, and "on" means that when given runlevel starts, /etc/init.d/mysql The service script is run by init .

You can also use chkconfig to modify the runway to run any service, and even all runlevels, so that it automatically Never start at all.

  $ chkconfig --level 2345 mysql off   

man chkconfig for more uses.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -