Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: mysql won't start on new installation 10.04

  1. #1
    Join Date
    Feb 2007
    Location
    Seattle, WA
    Beans
    146
    Distro
    Ubuntu 10.10 Maverick Meerkat

    mysql won't start on new installation 10.04

    I just installed a brand new ubuntu server 10.04 32-bit, choosing the LAMP option on install.

    Upon reboot I couldn't connect to mysql from another machine, so on this new server I changed the file at /var/mysql/my.cnf

    Code:
    bind-address            = 192.168.5.21
    That is the IP address of the server itself. For whatever reason, when I run
    Code:
    /etc/init.d/mysql start
    or a restart, it just hangs and never starts the daemon now. Any ideas?

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: mysql won't start on new installation 10.04

    Is MySQL server running currently? You can see that with

    Code:
    ps aux | grep mysql
    If it is running, try killing it and then starting it with the init script. If it's not, try to run it directly with

    Code:
    mysqld
    (as root, so do a sudo -i beforehand), and see if you get any helpful error message.
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Feb 2007
    Location
    Seattle, WA
    Beans
    146
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mysql won't start on new installation 10.04

    Quote Originally Posted by Bachstelze View Post
    Is MySQL server running currently? You can see that with

    Code:
    ps aux | grep mysql
    If it is running, try killing it and then starting it with the init script. If it's not, try to run it directly with

    Code:
    mysqld
    (as root, so do a sudo -i beforehand), and see if you get any helpful error message.
    I have gotten a little further. I rebooted the server for the umpteenth time, and this time went for a coffee break. I came back and did a
    Code:
    ps -ef | grep mysql
    Lo and behold, the service is running. It seems like that for whatever reason it's taking it a minute after the server first boots up in order to fully run the mysql daemon. I kept logging in right away, seeing that it wasn't running and trying to stop it through
    Code:
    /etc/init.d/mysql restart
    which kept either having strange messages or just hanging.

    Now, I am back to square one. The mysqld is running, but I can't connect to the mysql service on another machine.

    Under /etc/mysql/my.cnf, I have
    Code:
    bind-address            = 0.0.0.0
    in order to allow it to accept any incoming connection. However, I can't connect from another machine, only locally. I can connect via ssh to the server, so I know it's not a network issue.

  4. #4
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: mysql won't start on new installation 10.04

    Quote Originally Posted by senor_smile View Post
    However, I can't connect from another machine, only locally.
    What happens when you try?
    「明後日の夕方には帰ってるからね。」


  5. #5
    Join Date
    Feb 2007
    Location
    Seattle, WA
    Beans
    146
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mysql won't start on new installation 10.04

    Quote Originally Posted by Bachstelze View Post
    What happens when you try?
    Code:
    ERROR 1130 (HY000): Host '192.168.5.130' is not allowed to connect to this MySQL server

  6. #6
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: mysql won't start on new installation 10.04

    Quote Originally Posted by senor_smile View Post
    Code:
    ERROR 1130 (HY000): Host '192.168.5.130' is not allowed to connect to this MySQL server
    This is not really a connection problem then, you can connect to the server just fine, it's just denying you access. Check your privileges table.
    「明後日の夕方には帰ってるからね。」


  7. #7
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: mysql won't start on new installation 10.04

    There is a bug in 10.04. If you have it bind to a specific interface, it will fail to start on reboot because it attempts to start after any network interface (such as 127.0.0.1) is initialized. The interface it was configured to bind with won't be initialized yet. You can either bind it to all interfaces by commenting that line out, or edit /etc/init/mysql.conf.
    Code:
    # MySQL Service
    
    description     "MySQL Server"
    author          "Mario Limonciello <superm1@ubuntu.com>"
    
    start on (net-device-up IFACE=eth0
              and local-filesystems)
    stop on runlevel [016]
    
    respawn
    
    env HOME=/etc/mysql
    umask 007
    
    pre-start script
        #Sanity checks
        [ -r $HOME/my.cnf ]
        [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
        LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 | awk '{ exit ($4<4096) }'
    end script
    
    exec /usr/sbin/mysqld
    
    post-start script
        while ! /usr/bin/mysqladmin --defaults-file=$HOME/debian.cnf ping
        do
            sleep 1
        done
        exec $HOME/debian-start
    end script
    https://bugs.launchpad.net/ubuntu/+s....1/+bug/566736

    For error 1130, you need to grant permission for that host to connect remotely.
    Code:
    GRANT ALL ON table.* TO 'user'@'192.168.5.130' identified by 'mypassword';
    or for any host
    Code:
    GRANT ALL ON table.* TO 'user'@'%' identified by 'mypassword';
    Last edited by cdenley; May 10th, 2010 at 10:12 PM.

  8. #8
    Join Date
    Feb 2007
    Location
    Seattle, WA
    Beans
    146
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mysql won't start on new installation 10.04

    Quote Originally Posted by Bachstelze View Post
    This is not really a connection problem then, you can connect to the server just fine, it's just denying you access. Check your privileges table.
    Ah, I see. This is my first mysql installation. I am installing it to try to figure out how to use it in lieue of MS sql.

    I googled around a bit on setting privileges. I tried a few commands but none were successful. How would I add a single local host, or a subnet to allow access to mysql?

  9. #9
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: mysql won't start on new installation 10.04

    Quote Originally Posted by senor_smile View Post
    I googled around a bit on setting privileges. I tried a few commands but none were successful. How would I add a single local host, or a subnet to allow access to mysql?
    See the end of my previous post.

  10. #10
    Join Date
    Feb 2007
    Location
    Seattle, WA
    Beans
    146
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: mysql won't start on new installation 10.04

    Quote Originally Posted by cdenley View Post
    See the end of my previous post.
    Ah thanks, I think we were writing our replies at the same time.
    When I run either command I get:

    Code:
    mysql> GRANT ALL on table.* to root@% identified by 'temppassword';
    ERROR 1064 (42000): You have an error in your SQL syntax; check the
     manual that corresponds to your MySQL server version for the right 
    syntax to use near '* to root@% identified by 'temppassword'' at 
    line 1

Page 1 of 2 12 LastLast

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
  •