Installation issues with MySQL 5.5.4 and resolveip

I was installing the latest MySQL 5.5.4 on a new machine and I came across the following issues during installation, steps I generally perform on other versions without any incidents.

$ sudo su -
$ cd /opt
$ wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.4-m3-linux2.6-x86_64.tar.gz/from/http://mysql.mirrors.hoobly.com/
$ tar xvfz mysql-5.5.4-m3-linux2.6-x86_64.tar.gz
$ cd mysql-5.5.4-m3-linux2.6-x86_64
$ scripts/mysql_install_db
Neither host 'barney' nor 'localhost' could be looked up with /usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with the --force option

Perform some checks

$ /usr/bin/resolveip
-su: /usr/bin/resolveip: No such file or directory

$ hostname
barney

$ head -2 /etc/hosts
127.0.0.1	localhost
127.0.1.1	barney

I was surprised to find that my Ubuntu 10.04 Lucid Lynx box had a different IP for hostname, rather then 127.0.0.1. That was a little weird. I changed this just for comfort.

I was not familiar with this command so I tried to install it.

$ apt-get install resolveip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package resolveip

$  apt-cache search resolveip

No luck there, off to Google to do a search for resolveip and ubuntu you find the following online manual page which surprising shows the following as the owner of the command.
COPYRIGHT
Copyright 2007-2008 MySQL AB, 2009 Sun Microsystems, Inc.

Thinking it’s now actually packaged with MySQL we find this in the untar directory.

$ bin/resolveip `hostname`
IP address of barney is 127.0.0.1

I’m now still none the wiser regarding this command. I’ve decided to take the –force option for now and we will see!

Comments

  1. Matthew Montgomery says

    In attempting to reproduce your install error I got instead:

    [email protected]:/opt/mysql-5.5.4-m3-linux2.6-x86_64# scripts/mysql_install_db

    FATAL ERROR: Could not find mysqld

    The following directories were searched:

    /usr/libexec
    /usr/sbin
    /usr/bin

    If you compiled from source, you need to run ‘make install’ to
    copy the software into the correct location ready for operation.

    If you are using a binary release, you must either be at the top
    level of the extracted archive, or pass the –basedir option
    pointing to that location.

    then

    [email protected]:/opt/mysql-5.5.4-m3-linux2.6-x86_64# ./scripts/mysql_install_db –basedir=$PWD
    Installing MySQL system tables…
    100426 12:08:12 [Note] Buffered information: Performance schema disabled (reason: start parameters).

    100426 12:08:12 [Warning] Neither –relay-log nor –relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use ‘–relay-log=mysqld-relay-bin’ to avoid this problem.
    100426 12:08:13 [ERROR] Incorrect definition of table mysql.proc: expected column ‘comment’ at position 15 to have type text, found type char(64).
    ERROR: 1548 Cannot load from mysql.proc. The table is probably corrupted
    100426 12:08:13 [ERROR] Aborting

  2. orestis says

    I had the same problem. The solution I found was the following.

    Run the command like this (Ubuntu 10.04):
    While you are in the mysql folder

    sudo ./scripts/mysql_install_db –basedir=”home/orestis/Programs/mysql” –user=mysql

    You should also check the help text which appears with ./scripts/mysql_install_db –help

  3. DaPanda says

    Set the base dir to . or “” would do the trick if you are running it from the basedir
    scripts/mysql_install_db –basedir=””

    — It works on MY computer!