Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Disable MySQL startup in Ubuntu 10.04

  1. #11

    Re: Disable MySQL startup in Ubuntu 10.04

    Quote Originally Posted by bryanhogan View Post
    I've put in kill scripts in all run levels - K20mysql...it is still running after boot!
    Ah so there is a mysql script... wonder why my command didn't return it.

    If it is running as another user, it might be getting triggered somewhere else...

    Check if there are .rc files in /root/

    Check out the init.d mysql sh script to see how mysql operates.

    Find out more about the mysqld user and how it gets started.

    Maybe run my grep command with the username instead of mysql.

    That's all I got mate gl.

  2. #12
    Join Date
    May 2010
    Beans
    10

    Re: Disable MySQL startup in Ubuntu 10.04

    Quote Originally Posted by longanduselessname View Post
    Ah so there is a mysql script... wonder why my command didn't return it.

    If it is running as another user, it might be getting triggered somewhere else...

    Check if there are .rc files in /root/

    Check out the init.d mysql sh script to see how mysql operates.

    Find out more about the mysqld user and how it gets started.

    Maybe run my grep command with the username instead of mysql.

    That's all I got mate gl.

    The mysql script is in /etc/inid.d

  3. #13
    Join Date
    May 2010
    Beans
    10

    Re: Disable MySQL startup in Ubuntu 10.04

    Quote Originally Posted by bryanhogan View Post
    The mysql script is in /etc/inid.d

    Removed the mysql script in /etc/inid.d

    I have checked the /root/ for any start up files.

    The home directory of the mysql user has no scripts that start on login.

    I'm at the stage where I'll have to rename/move the mysqld.

    Where else can this be loading from on boot?

  4. #14
    Join Date
    May 2010
    Location
    Bedford UK
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disable MySQL startup in Ubuntu 10.04

    Quote Originally Posted by bryanhogan View Post
    Removed the mysql script in /etc/inid.d

    I have checked the /root/ for any start up files.

    The home directory of the mysql user has no scripts that start on login.

    I'm at the stage where I'll have to rename/move the mysqld.

    Where else can this be loading from on boot?

    Lucid uses upstart to launch mysql. All the files are in /etc/init (not init.d). Open the mysql.conf script. The instructions for starting mysql are at the top. As a test, you can # the "start on" line to prevent the service starting on boot up.

    I am still looking at this to see how I can properly modify the script to do what I want.

    See this for more info on upstart http://upstart.ubuntu.com/

  5. #15
    Join Date
    May 2010
    Beans
    10

    Re: Disable MySQL startup in Ubuntu 10.04

    Quote Originally Posted by Ramage21 View Post
    Lucid uses upstart to launch mysql. All the files are in /etc/init (not init.d). Open the mysql.conf script. The instructions for starting mysql are at the top. As a test, you can # the "start on" line to prevent the service starting on boot up.

    I am still looking at this to see how I can properly modify the script to do what I want.

    See this for more info on upstart http://upstart.ubuntu.com/
    Wow, I just figured that out in the last 10 minutes too

    Found this link quite useful - http://www.linuxplanet.com/linuxplan...orials/7033/1/

    I had done exactly what you suggest, comment out the two lines connected with the "start on".

  6. #16
    Join Date
    May 2010
    Location
    Bedford UK
    Beans
    2
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disable MySQL startup in Ubuntu 10.04

    Quote Originally Posted by bryanhogan View Post
    Wow, I just figured that out in the last 10 minutes too

    Found this link quite useful - http://www.linuxplanet.com/linuxplan...orials/7033/1/

    I had done exactly what you suggest, comment out the two lines connected with the "start on".
    What I have now done is add runlevel 2 to the stop line of the script which stops mysql prematurely

    Code:
    # MySQL Service
    
    description     "MySQL Server"
    author          "Mario Limonciello <superm1@ubuntu.com>"
    
    start on (net-device-up
              and local-filesystems)
    stop on runlevel [0126]
    I can then start and stop mysql manually using the service command

    Thanks for the info ref

  7. #17

    Re: Disable MySQL startup in Ubuntu 10.04

    Quote Originally Posted by bryanhogan View Post
    Wow, I just figured that out in the last 10 minutes too

    Found this link quite useful - http://www.linuxplanet.com/linuxplan...orials/7033/1/

    I had done exactly what you suggest, comment out the two lines connected with the "start on".

    I've always wondered how ubuntu started my network card, since /etc/network/interfaces by default doesn't have any configuration for eth0.

    Showing my noob colors for not thinking about upstart, or really understanding how it works!

    EDIT: Sorry for leading you on wrong track bryanhogan ;_;
    Last edited by longanduselessname; May 9th, 2010 at 08:01 PM.

  8. #18
    Join Date
    Jul 2008
    Location
    Upstate SC, USA
    Beans
    27
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disable MySQL startup in Ubuntu 10.04

    Thanks! To summarize:

    sudo vim /etc/init/mysql.conf

    Edit it to say the following (I move the 2 from the first set of numbers to the second):

    start on (net-device-up and local-filesystems and runlevel [345])
    stop on runlevel[0126]

    Works like a charm!

    reboot
    ...

    initctl list
    ...
    mysql stop/waiting

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •