Announcement

Collapse
No announcement yet.

MySQL not starting automatically

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    MySQL not starting automatically

    Good day - I have a MySQL database running on my system, in order for me to share the database with the network, I have had to change the bind address of the Mysql.conf file to the IP of the server.

    However - now if I reboot the server - Mysql does not automatically start - but if I go into the services CP, I can start it manually.

    any suggestions

    #2
    Re: MySQL not starting automatically

    Interesting ... is there nothing in the mysql logs (/var/log/mysql) or startup logs (/var/log/daemon.log)?
    If it were me, I would first check the logs, then completely remove mysql from the system init, then re-add it.
    Check this out: https://help.ubuntu.com/community/UbuntuBootupHowto

    Good luck!

    Comment


      #3
      Re: MySQL not starting automatically

      Thanks for the suggestions:
      Nothing under mysql.log or mysql.err

      but under daemon.log after I rebooted I get this for Mysql

      Oct 1 17:57:14 speedy mysqld_safe[5035]: started
      Oct 1 17:57:15 speedy mysqld[5039]: 081001 17:57:15 InnoDB: Started; log sequence number 0 43655
      Oct 1 17:57:15 speedy mysqld[5039]: 081001 17:57:15 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
      Oct 1 17:57:15 speedy mysqld[5039]: 081001 17:57:15 [ERROR] Do you already have another mysqld server running on port: 3306 ?
      Oct 1 17:57:15 speedy mysqld[5039]: 081001 17:57:15 [ERROR] Aborting
      Oct 1 17:57:15 speedy mysqld[5039]:
      Oct 1 17:57:15 speedy mysqld[5039]: 081001 17:57:15 InnoDB: Starting shutdown...
      Oct 1 17:57:17 speedy mysqld[5039]: 081001 17:57:17 InnoDB: Shutdown completed; log sequence number 0 43655
      Oct 1 17:57:17 speedy mysqld[5039]: 081001 17:57:17 [Note] /usr/sbin/mysqld: Shutdown complete
      Oct 1 17:57:17 speedy mysqld[5039]:
      Oct 1 17:57:17 speedy mysqld_safe[5106]: ended
      Oct 1 17:57:28 speedy /etc/init.d/mysql[5378]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulte
      d in
      Oct 1 17:57:28 speedy /etc/init.d/mysql[5378]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
      Oct 1 17:57:28 speedy /etc/init.d/mysql[5378]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
      Oct 1 17:57:28 speedy /etc/init.d/mysql[5378]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
      Oct 1 17:57:28 speedy /etc/init.d/mysql[5378]:
      Does any of this make sense to anybody ?

      I did have a brain fart on this too:
      Looking at Daemon.log - it seems as though the network is starting up after mysql is trying to startup. So if that is true - then the bind IP that I have setup in Mysql.conf would in theory not exist yet, as mysql does not know about the network device. Would that correct?

      If that is correct - how wold I go about fixing it - ie starting Mysql AFTER the network?


      Thanks


      PS:
      This is daemon.log AFTER I have logged in - and gone to the admin CP and started the service manually:
      Oct 1 18:19:11 speedy mysqld_safe[6675]: started
      Oct 1 18:19:12 speedy mysqld[6679]: 081001 18:19:12 InnoDB: Started; log sequence number 0 43655
      Oct 1 18:19:12 speedy mysqld[6679]: 081001 18:19:12 [Note] /usr/sbin/mysqld: ready for connections.
      Oct 1 18:19:12 speedy mysqld[6679]: Version: '5.0.51a-3ubuntu5.1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
      Oct 1 18:19:12 speedy /etc/mysql/debian-start[6717]: Upgrading MySQL tables if necessary.
      Oct 1 18:19:13 speedy /etc/mysql/debian-start[6722]: Looking for 'mysql' in: /usr/bin/mysql
      Oct 1 18:19:13 speedy /etc/mysql/debian-start[6722]: Looking for 'mysqlcheck' in: /usr/bin/mysqlcheck
      Oct 1 18:19:13 speedy /etc/mysql/debian-start[6722]: This installation of MySQL is already upgraded to 5.0.51a, use --force if you still need
      to run mysql_upgrade
      Oct 1 18:19:13 speedy /etc/mysql/debian-start[6731]: Checking for insecure root accounts.
      Oct 1 18:19:13 speedy /etc/mysql/debian-start[6735]: Checking for crashed MySQL tables.

      Comment


        #4
        Re: MySQL not starting automatically

        I think you've got it figured out ... just put mysql in a runlevel after your network init: https://help.ubuntu.com/community/UbuntuBootupHowto

        Comment


          #5
          Re: MySQL not starting automatically

          Okay - Now I am confused - When I look in the rc*.d for the script - the mysql script is in all the directories.
          I thought that the runlevels started in order.
          So if that is the case - when mysql fails in a certain level - shouldn't it kick in later?

          Sorry for the questions - I just don't want to screw up the system

          THanks

          Comment


            #6
            Re: MySQL not starting automatically

            Okay - I figured it out - I used BootUpManager
            http://www.marzocca.net/linux/bum.html
            and changed the mysql S value to one that is higher than the networking.

            Rebooted - and mysql started on bootup

            Thanks

            Comment

            Working...
            X