title: mysql_install_db giving error
body: <p>I have downloaded the <strong>mysql-5.1.38-linux-x86_64-glibc23.tar.gz</strong> from <a href="http://dev.mysql.com/downloads" rel="noreferrer">here</a></p>
  <p>and then i have executed it by using below command</p>
  <pre><code>groupadd mysql
  
  useradd -g mysql mysql123
  
  cp mysql-5.1.38-linux-x86_64-glibc23.tar.gz /home /mysql123/
  
  su - mysql123
  
  tar -zxvf mysql-5.1.38-linux-x86_64-glibc23.tar.gz
  
  mv mysql-5.1.38-linux-x86_64-glibc23 mysql
  
  mkdir tmp
  
  cd mysql/
  
  mv suppport-files/my-medium.cnf my.cnf
  
  cp support-files/mysql.server bin/
  </code></pre>
  <p>and then i have edited the my.cnf and set the basedir and datadir to <strong>/home/mysql123/mysql</strong> and <strong>/home/mysql123/mysql/data</strong> and innodb_home_dir and logfile directory to datadir</p>
  <p>Now edited mysql.server and set the datadir and basedir in them properly</p>
  <p>and then initiated mysql_install_db as</p>
  <pre><code>[mysql123@localhost mysql]$ ./scripts/mysql_install_db
  ./scripts/mysql_install_db: line 244: ./bin/my_print_defaults: cannot execute binary file
  Neither host '127.0.0.1' nor 'localhost' could be looked up with
  ./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
  </code></pre>
  <p>on seeing the error i thought it may be confused with basedir and executed the same as below</p>
  <pre><code>[mysql123@localhost mysql]$ ./scripts/mysql_install_db -–user=mysql123 -–basedir=/home/mysql123/mysql
  ./scripts/mysql_install_db: line 244: ./bin/my_print_defaults: cannot execute binary file
  Neither host '127.0.0.1' nor 'localhost' could be looked up with
  ./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
  </code></pre>
  <p>i am not gettin what is going internally and showing this kind of message</p>
  <p>and i am sure that i have enough diskspace ( <strong>df -h</strong> ) and i have proper ownership ( <strong>chown mysq123:mysql /home/mysql123/ -R</strong>) and proper permissions ( <strong>chmod 755 .</strong>)</p>
  <p>and the lines in mysql_install_db are like below
  <img src="https://i.stack.imgur.com/G3sMb.png" alt="enter image description here" /></p>
  <p>please any help to solve this problem is very useful ( and i have to follow the same installation process)</p>
  <p>i am using redhat 6</p>