Results 1 to 4 of 4

Thread: automate install of mysql-server

  1. #1
    Join Date
    Nov 2008
    Beans
    1

    automate install of mysql-server

    In order to install mysql-server I do this:
    Code:
    sudo apt-get install -y mysql-server
    But, the installation process pops up a blue dialog asking for a root password.

    I need to completely automate the installation of mysql-server.

    This post on the Forum Archives has a solution, but it didn't work:

    http://ubuntuforums.org/archive/index.php/t-677482.html

    It was a good start, though. Here is what I needed to do in order to prevent the prompt from happening:

    Code:
    echo "mysql-server mysql-server/root_password select (password omitted)" | debconf-set-selections
    echo "mysql-server mysql-server/root_password_again select (password omitted)" | debconf-set-selections
    I put those lines in my setup script and then the mysql-server installation doesn't prompt for a root password.

  2. #2
    Join Date
    Nov 2007
    Beans
    5

    Re: automate install of mysql-server

    That worked perfectly, to clear up any confusion others may have... The lines he provided should be placed right above your apt-get install command for MySQL, within the bash script you are using to automate the process.

  3. #3
    Join Date
    May 2009
    Location
    Belgium
    Beans
    22
    Distro
    Ubuntu

    Re: automate install of mysql-server

    it does work indeed like expected; however what is the password when this is installed? it's not blank, and neither is it one of the default passwords one might expect.

  4. #4
    Join Date
    Jul 2009
    Beans
    4

    Re: automate install of mysql-server

    The correct commands are

    echo "mysql-server-5.1 mysql-server/root_password password your_mysql_root_password" | debconf-set-selections
    echo "mysql-server-5.1 mysql-server/root_password_again password your_mysql_root_password" | debconf-set-selections
    sudo apt-get -y install mysql-server-5.1

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
  •