Results 1 to 5 of 5

Thread: Rather than invoking init scripts through /etc/init.d, use the service

  1. #1
    Join Date
    Feb 2005
    Beans
    22

    Rather than invoking init scripts through /etc/init.d, use the service

    I am trying to set up mysql on a stock 64bit ubuntu AMI (micro instance, ami-548c783d). I was following the server guide mysql section.

    So, I spin up a fresh instance, install glassfish successfully, and do the following using directions from the server guide:

    1) sudo apt-get install mysql-server (no problem)
    2) sudo netstat -tap | grep mysql (yep, works.)
    3) edit the my.cnf to the correct bind-address (no problem)
    4) sudo /etc/init.d/mysql restart

    Upon #4, the restart, the command line _HANGS_ after the following response...

    "Rather than invoking init scripts through /etc/init.d, use the service utility, e.g. service mysql restart

    Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the restart utility, e.g. restart mysql
    "


    Questions:

    * It is not clear by the message whether or not mysql is actually being restarted or not. Is it just a suggestion?

    * What is "service" and "upstart"? Isn't init.d good enough? Why the change?

    * Why is this command hanging? Anyone else see this?

    Many Thanks for any help!

  2. #2
    Join Date
    Nov 2004
    Beans
    558
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Rather than invoking init scripts through /etc/init.d, use the service

    in order to stop/start a service since upstart (which uses the /etc/init.d/ scripts), run:
    Code:
    $ sudo service mysql-server start

  3. #3
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Rather than invoking init scripts through /etc/init.d, use the service

    It's been converted to an upstart job.

    Use this to start/stop/restart:

    Code:
    sudo service mysql start|stop|restart
    Ninja'd.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  4. #4
    Join Date
    Feb 2005
    Beans
    22

    Re: Rather than invoking init scripts through /etc/init.d, use the service

    Thanks,

    I terminated the failed init.d command and then tried "sudo restart mysql-server", it responded with "mysql start/running", no errors.

    But when I use netstat to verify if mysql is running properly, I get nothing. I had set the bind-address to be my allocated elastic-ip address. Even after a reboot, still mysql isn't listening on ports. Although it is present in the ps -ax (as mysqld).

    Does invoking init.d scripts while upstart is installed mess things up?

  5. #5
    Join Date
    Feb 2005
    Beans
    22

    Re: Rather than invoking init scripts through /etc/init.d, use the service

    Oops, I think it has something to do with the setting bind-address to my elastic-ip and my interpretation of what netstat is supposed to show.

    When switch bind-address back to 127.0.0.1, and "sudo restart mysql", I can see mysql in netstat.

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
  •