Solved

Installation Problems

Posted on 2003-11-15
77
814 Views
Last Modified: 2012-08-13
I am trying to install MySQL from a disk included in the RedHat 8 Bible. However, I'm running into problems...

(steps so far)

mount /mnt/cdrom
rpm -i /mnt/cdrom/RedHat/RPMS/ *mysql*
(give me this warning) warning: /mnt/cdrom/RedHat/RPMS/libdbi -dbd-mysql-0.6.5-2.i386.rpm: V3 DSA Signature : NOKEY, key ID db42a60e error: Failed dependencies: libdbi = 0.6.5-2 is needed by libdbi - dbd-mysql-0.6.5-2 perl-DBD-MySQL is needed by mysql-3.23.52-3

PLEASE HELP ME.
0
Comment
Question by:cozmo_troll
  • 39
  • 37
77 Comments
 
LVL 7

Expert Comment

by:jconde
Comment Utility
You'll be better off installing mysql by downloading it from www.mysql.com.  Not only get the latest version (which means more features and fewer bugs), but its much easier to deal with than a third party rpm.

Go to www.mysql.com and download the binary version of mysql 4.0.16 (for your specific system) and then extract the newly downloaded file it in /usr/local (tar xfz mysql-version.tar.gz) and read the INSTALL-BINARY file ... I'm sure if you follow these quite simple and straight-forward instructions you'll have mysql up & running in no time.

You can also download the rpm version which basically does everything for you, but I beleive you get a lot more "freedom" by installing the binary distribution.

Now, back to your question, that's exactly what happens when you install mysql from non official sources :)  ... in this case, you need to install the dbd mysql driver module for Perl and by looking at their version, they're quite old too!

BTW, mysql does NOT require Perl at all !!
0
 

Author Comment

by:cozmo_troll
Comment Utility
OK, I've installed both the server & client parts (rpm version) what now?
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
well, if the rpm installation went well, you are now ready to enjoy mysql :)

go to a shell prompt and from root type "mysql"  ... that should start the mysql console client up.

The next thing you'll need to do is create users ... you can do this with the GRANT statement ... look at:

http://www.mysql.com/doc/en/Adding_users.html for examples on how to add new users to mysql.
0
 

Author Comment

by:cozmo_troll
Comment Utility
I try that and I get this:

"ERROR 2002" Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
You probably haven't started the server up ... do a cd to  /etc/rc.d/init.d and look for the mysql startup script (usually called mysql)

then type ./mysql start (note, this might be mysql.server start, et al)

You need to do all of this from root.  Afterwards, try my previous comment again.
0
 

Author Comment

by:cozmo_troll
Comment Utility
It tells me "no such file or directory"
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
does /etc/rc.d/init.d exist on your system ?

0
 

Author Comment

by:cozmo_troll
Comment Utility
how do I find this out?
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
type the following:

cd /etc/rc.d/init.d

If it says "no such file or directory" then read your OS's documentation on where does it store the SysV init files and go to that cd to that directory.

then type the following:

ls -laF |grep mysql

and tell me if the last command returns something or not
0
 

Author Comment

by:cozmo_troll
Comment Utility
OK: after cd /etc/rc.d/init.d it changed to (root@bgserver init.d)#
Then after I typed the ls -laF |grep mysql it returned -rwxr-xr-x         1 root         root    0 Aug 7 12:41 mysqld*
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
excellent ...

now, in that directory as root type:

./mysqld start

and do what I told you about adding new users !
0
 

Author Comment

by:cozmo_troll
Comment Utility
Ok, I do that and nothing happens. No error appears, but nothing happens either. We also have Webmin for this machine and it tells me that MySQL is not running-database could not be retreived.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
if you do a ps fax | grep mysql, do you see anything there besides the grep process ?

look for the `hostname`.err file created by mysqld and do a cat on it.  Tell me what errors does it display.

... Remember when I told you that binary versions where better ? :)
0
 

Author Comment

by:cozmo_troll
Comment Utility
It says: 10408 tty1        S        0:00    \_ grep mysql
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
ok, so now you go into the interesting stuff ...

Look for the `hostname`.err file created by mysqld and do a cat on it.  Tell me what errors does it display.

I think the file is located in /var/lib/mysql/ or somewhere around there !
0
 

Author Comment

by:cozmo_troll
Comment Utility
Yes, now it is going to get interesting, because I have no idea what you're talking about or what I'm supposed to do. I have not worked with Linux for very long. Please clarify what I should do.

Thanks,
0
 

Author Comment

by:cozmo_troll
Comment Utility
Is there anyway I can see this from the desktop? Or do I have to type in codes?
0
 

Author Comment

by:cozmo_troll
Comment Utility
I know what our host name is: bgserver localhost.localdomain localhost
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
Ok, in that case I suggest an abort with the rpm (uninstall it) and install the binary version (unless you want to keep the thread open for other experts to try and help you).

The problem with rpms is they put everything spreaded out in different places.  Its very hard for me to say exactly where each file is located at ...

On the other hand, if you go for the binary version, you will have a lot more control over where everything is !

Are you up for this ?
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
0
 

Author Comment

by:cozmo_troll
Comment Utility
The problem is- I already did this before: see http://www.experts-exchange.com/Databases/Mysql/Q_20689569.html?query=libdbi&searchType=all

I just feel like we are so close... you've been a great help and I want to keep working with you. I'm sure there must be a way to find the information we need.?? :(
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
ok, lets see then .... first ....tell me what the output of
shell> mysql

is ?

Second, do the following command and paste the results here:

shell> cat /etc/rc.d/init.d/mysqld
0
 

Author Comment

by:cozmo_troll
Comment Utility
1. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

2. When I copy shell> cat /etc/rc.d/init.d/mysqld it does nothing. Just returns to (root@bgserver root)#
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
ok, so that's part of your problem .... that file should not be empty !!

First do a cd /etc/rc.d/init.d

then using the text editor of your choice, edit the mysqld file and put exactly what I pasted except for the lines that state the start and end of the file.

Make sure you save the file :P

Afterwards, type the following:

chmod 755 mysqld

When you're done doing that, type ./mysqld start and tell me what happens!


//////////////start of mysqld file /////////////////
#!/bin/bash
#
# mysqld      This shell script takes care of starting and stopping
#            the MySQL subsystem (mysqld).
#
# chkconfig: - 78 12
# description:      MySQL database server.
# processname: mysqld
# config: /etc/my.cnf
# pidfile: /var/run/mysqld/mysqld.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network


prog="MySQL"

datadir="/var/lib/mysql"

start(){
      touch /var/log/mysqld.log
      chown mysql.mysql /var/log/mysqld.log
      chmod 0640 /var/log/mysqld.log
      if [ ! -d $datadir/mysql ] ; then
          action $"Initializing MySQL database: " /usr/bin/mysql_install_db
          ret=$?
          chown -R mysql.mysql $datadir
          if [ $ret -ne 0 ] ; then
                return $ret
          fi
      fi
      chown -R mysql.mysql $datadir
      chmod 0755 $datadir
      /usr/bin/safe_mysqld  --defaults-file=/etc/my.cnf >/dev/null 2>&1 &
      ret=$?
      if [ $ret -eq 0 ]; then
          action $"Starting $prog: " /bin/true
      else
              action $"Starting $prog: " /bin/false
      fi
      [ $ret -eq 0 ] && touch /var/lock/subsys/mysqld
      return $ret
}

stop(){
        /bin/kill `cat /var/run/mysqld/mysqld.pid  2> /dev/null ` > /dev/null 2>&1
      ret=$?
      if [ $ret -eq 0 ]; then
          action $"Stopping $prog: " /bin/true
      else
              action $"Stopping $prog: " /bin/false
      fi
      [ $ret -eq 0 ] && rm -f /var/lock/subsys/mysqld
      [ $ret -eq 0 ] && rm -f $datadir/mysql.sock
      return $ret
}
 
restart(){
    stop
    start
}

condrestart(){
    [ -e /var/lock/subsys/mysqld ] && restart || :
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status mysqld
    ;;
  restart)
    restart
    ;;
  condrestart)
    condrestart
    ;;
  *)
    echo $"Usage: $0 {start|stop|status|condrestart|restart}"
    exit 1
esac

exit $?
//////////////////end of mysqld file///////////////
0
 

Author Comment

by:cozmo_troll
Comment Utility
Ok, before I start. I want to make sure I do this right. So, I just type everything you pasted above (with the exception of the start/end lines) into a code? Or how do I edit the text? I do this on the main screen of linux RH8, not the desktop? right?
0
 
LVL 7

Accepted Solution

by:
jconde earned 500 total points
Comment Utility
exactly ... basically, what you do is:

edit /etc/rc.d/init.d/mysqld

and paste everything I put there in-between the //////////////start / end mysqld///////////// ok ?

how do you edit the file ? .. you can use any text editor you have ... can be pico, vi, xemacs, emacs, jed, joe, ... anyone you're confortable with!

BTW, make sure you do this as root ok ?
0
 

Author Comment

by:cozmo_troll
Comment Utility
When I get to this line
>>>action $"Initializing MySQL database: " /usr/bin/mysql_install_db

It says sh: line 1: action: command not found


0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
Ok ...

do exactly the same as you did but now with mysql_install_db ...

edit /usr/bin/mysql_install_db and paste what follows:

After you edit and save that file in /usr/bin, make sure you execute the following command:

chmod 755 /usr/bin/mysql_install_db

//////////mysql_install_db////////////
#!/bin/sh
# Copyright (C) 1997, 1998, 1999 TCX DataKonsult AB & Monty Program KB & Detron HB
# For a more info consult the file COPYRIGHT distributed with this file.

# This scripts creates the privilege tables db, host, user, tables_priv,
# columns_priv in the mysql database, as well as the func table.
#
# All unrecognized arguments to this script are passed to mysqld.

IN_RPM=0
case "$1" in
    -IN-RPM)
      IN_RPM="1"; shift
      ;;
esac
defaults=
case "$1" in
    --no-defaults|--defaults-file=*|--defaults-extra-file=*)
      defaults="$1"; shift
      ;;
esac

parse_arguments() {
  # We only need to pass arguments through to the server if we don't
  # handle them here.  So, we collect unrecognized options (passed on
  # the command line) into the args variable.
  pick_args=
  if test "$1" = PICK-ARGS-FROM-ARGV
  then
    pick_args=1
    shift
  fi

  for arg do
    case "$arg" in
      --force) force=1 ;;
      --basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
      --ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
      --user=*) user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
      *)
        if test -n "$pick_args"
        then
          # This sed command makes sure that any special chars are quoted,
          # so the arg gets passed exactly to the server.
          args="$args "`echo "$arg" | sed -e 's,\([^a-zA-Z0-9_.-]\),\\\\\1,g'`
        fi
        ;;
    esac
  done
}

# Get first arguments from the my.cfg file, groups [mysqld] and
# [mysql_install_db], and then merge with the command line arguments
if test -x ./bin/my_print_defaults
then
  print_defaults="./bin/my_print_defaults"
elif test -x /usr/bin/my_print_defaults
then
  print_defaults="/usr/bin/my_print_defaults"
elif test -x /usr/bin/mysql_print_defaults
then
  print_defaults="/usr/bin/mysql_print_defaults"
else
  print_defaults="my_print_defaults"
fi

args=
ldata=
execdir=
bindir=
basedir=
force=0
parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"

test -z "$ldata" && ldata=/var/lib/mysql
if test -z "$basedir"
then
  basedir=/usr
  bindir=/usr/bin
  execdir=/usr/libexec
else
  bindir="$basedir/bin"
if test -x "$basedir/libexec/mysqld"
then
  execdir="$basedir/libexec"
elif test -x "/usr/libexec/mysqld"
then
  execdir="/usr/libexec"
else
  execdir="$basedir/bin"
fi
fi

mdata=$ldata/mysql

if test ! -x $execdir/mysqld
then
  if test "$IN_RPM" -eq 1
  then
    echo "FATAL ERROR $execdir/mysqld not found!"
    exit 1
  else
    echo "Didn't find $execdir/mysqld"
    echo "You should do a 'make install' before executing this script"
    exit 1
  fi
fi

hostname=`/bin/hostname`            # Install this too in the user table

# Check if hostname is valid
if test "$IN_RPM" -eq 0 -a $force -eq 0
then
  resolved=`$bindir/resolveip $hostname 2>&1`
  if [ $? -ne 0 ]
  then
    resolved=`$bindir/resolveip localhost 2>&1`
    if [ $? -eq 0 ]
    then
      echo "Sorry, the host '$hostname' could not be looked up."
      echo "Please configure the 'hostname' command to return a correct hostname."
      echo "If you want to solve this at a later stage, restart this script with"
      echo "the --force option"
      exit 1
    fi
    echo "WARNING: The host '$hostname' could not be looked up with resolveip."
    echo "This probably means that your libc libraries are not 100 % compatible"
    echo "with this binary MySQL version. The MySQL deamon, mysqld, should work"
    echo "normally with the exception that host name resolving will not work."
    echo "This means that you should use IP addresses instead of hostnames"
    echo "when specifying MySQL privileges !"
  fi
fi

# Create database directories mysql & test
if test "$IN_RPM" -eq 0
then
  if test ! -d $ldata; then mkdir $ldata; chmod 700 $ldata ; fi
  if test ! -d $ldata/mysql; then mkdir $ldata/mysql;  chmod 700 $ldata/mysql ; fi
  if test ! -d $ldata/test; then mkdir $ldata/test;  chmod 700 $ldata/test ; fi
  if test -w / -a ! -z "$user"; then
    chown $user $ldata $ldata/mysql $ldata/test;
  fi
fi

# Initialize variables
c_d="" i_d=""
c_h="" i_h=""
c_u="" i_u=""
c_f="" i_f=""
c_t="" c_c=""

# Check for old tables
if test ! -f $mdata/db.frm
then
  echo "Preparing db table"

  # mysqld --bootstrap wants one command/line
  c_d="$c_d CREATE TABLE db ("
  c_d="$c_d   Host char(60) binary DEFAULT '' NOT NULL,"
  c_d="$c_d   Db char(64) binary DEFAULT '' NOT NULL,"
  c_d="$c_d   User char(16) binary DEFAULT '' NOT NULL,"
  c_d="$c_d   Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d PRIMARY KEY Host (Host,Db,User),"
  c_d="$c_d KEY User (User)"
  c_d="$c_d )"
  c_d="$c_d comment='Database privileges';"
 
  i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
  INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');"
fi

if test ! -f $mdata/host.frm
then
  echo "Preparing host table"

  c_h="$c_h CREATE TABLE host ("
  c_h="$c_h  Host char(60) binary DEFAULT '' NOT NULL,"
  c_h="$c_h  Db char(64) binary DEFAULT '' NOT NULL,"
  c_h="$c_h  Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  PRIMARY KEY Host (Host,Db)"
  c_h="$c_h )"
  c_h="$c_h comment='Host privileges;  Merged with database privileges';"
fi

if test ! -f $mdata/user.frm
then
  echo "Preparing user table"

  c_u="$c_u CREATE TABLE user ("
  c_u="$c_u   Host char(60) binary DEFAULT '' NOT NULL,"
  c_u="$c_u   User char(16) binary DEFAULT '' NOT NULL,"
  c_u="$c_u   Password char(16) binary DEFAULT '' NOT NULL,"
  c_u="$c_u   Select_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Insert_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Update_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Delete_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Create_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Drop_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Reload_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Shutdown_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Process_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   File_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Grant_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_u="$c_u   PRIMARY KEY Host (Host,User)"
  c_u="$c_u )"
  c_u="$c_u comment='Users and global privileges';"

  i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
  INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
 
  REPLACE INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
  REPLACE INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
 
  INSERT INTO user VALUES ('localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
  INSERT INTO user VALUES ('$hostname','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N');"
fi

if test ! -f $mdata/func.frm
then
  echo "Preparing func table"

  c_f="$c_f CREATE TABLE func ("
  c_f="$c_f   name char(64) binary DEFAULT '' NOT NULL,"
  c_f="$c_f   ret tinyint(1) DEFAULT '0' NOT NULL,"
  c_f="$c_f   dl char(128) DEFAULT '' NOT NULL,"
  c_f="$c_f   type enum ('function','aggregate') NOT NULL,"
  c_f="$c_f   PRIMARY KEY (name)"
  c_f="$c_f )"
  c_f="$c_f   comment='User defined functions';"
fi

if test ! -f $mdata/tables_priv.frm
then
  echo "Preparing tables_priv table"

  c_t="$c_t CREATE TABLE tables_priv ("
  c_t="$c_t   Host char(60) binary DEFAULT '' NOT NULL,"
  c_t="$c_t   Db char(64) binary DEFAULT '' NOT NULL,"
  c_t="$c_t   User char(16) binary DEFAULT '' NOT NULL,"
  c_t="$c_t   Table_name char(60) binary DEFAULT '' NOT NULL,"
  c_t="$c_t   Grantor char(77) DEFAULT '' NOT NULL,"
  c_t="$c_t   Timestamp timestamp(14),"
  c_t="$c_t   Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') DEFAULT '' NOT NULL,"
  c_t="$c_t   Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,"
  c_t="$c_t   PRIMARY KEY (Host,Db,User,Table_name),"
  c_t="$c_t   KEY Grantor (Grantor)"
  c_t="$c_t )"
  c_t="$c_t   comment='Table privileges';"
fi

if test ! -f $mdata/columns_priv.frm
then
  echo "Preparing columns_priv table"

  c_c="$c_c CREATE TABLE columns_priv ("
  c_c="$c_c   Host char(60) binary DEFAULT '' NOT NULL,"
  c_c="$c_c   Db char(64) binary DEFAULT '' NOT NULL,"
  c_c="$c_c   User char(16) binary DEFAULT '' NOT NULL,"
  c_c="$c_c   Table_name char(64) binary DEFAULT '' NOT NULL,"
  c_c="$c_c   Column_name char(64) binary DEFAULT '' NOT NULL,"
  c_c="$c_c   Timestamp timestamp(14),"
  c_c="$c_c   Column_priv set('Select','Insert','Update','References') DEFAULT '' NOT NULL,"
  c_c="$c_c   PRIMARY KEY (Host,Db,User,Table_name,Column_name)"
  c_c="$c_c )"
  c_c="$c_c   comment='Column privileges';"
fi

echo "Installing all prepared tables"
if eval "$execdir/mysqld $defaults --bootstrap --skip-grant-tables \
         --basedir=$basedir --datadir=$ldata --skip-innodb --skip-gemini --skip-bdb $args" << END_OF_DATA
use mysql;
$c_d
$i_d

$c_h
$i_h

$c_u
$i_u

$c_f
$i_f

$c_t
$c_c
END_OF_DATA
then
  echo ""
  if test "$IN_RPM" -eq 0
  then
    echo "To start mysqld at boot time you have to copy support-files/mysql.server"
    echo "to the right place for your system"
    echo
  fi
  echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
  echo "This is done with:"
  echo "$bindir/mysqladmin -u root  password 'new-password'"
  echo "$bindir/mysqladmin -u root -h $hostname  password 'new-password'"
  echo "See the manual for more instructions."
  #
  # Print message about upgrading unless we have created a new db table.
  if test -z "$c_d"
  then
    echo
    echo "NOTE:  If you are upgrading from a MySQL <= 3.22.10 you should run"
    echo "the $bindir/mysql_fix_privilege_tables. Otherwise you will not be"
    echo "able to use the new GRANT command!"
  fi
  echo
  if test "$IN_RPM" -eq 0
  then
    echo "You can start the MySQL daemon with:"
    echo "cd /usr ; $bindir/safe_mysqld &"
    echo
    echo "You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:"
    echo "cd sql-bench ; run-all-tests"
    echo
  fi
  echo "Please report any problems with the /usr/bin/mysqlbug script!"
  echo
  echo "The latest information about MySQL is available on the web at"
  echo "http://www.mysql.com"
  echo "Support MySQL by buying support/licenses at https://order.mysql.com"
  echo
  exit 0
else
  echo "Installation of grant tables failed!"
  echo
  echo "Examine the logs in $ldata for more information."
  echo "You can also try to start the mysqld daemon with:"
  echo "$execdir/mysqld --skip-grant &"
  echo "You can use the command line tool"
  echo "$bindir/mysql to connect to the mysql"
  echo "database and look at the grant tables:"
  echo
  echo "shell> $bindir/mysql -u root mysql"
  echo "mysql> show tables"
  echo
  echo "Try 'mysqld --help' if you have problems with paths. Using --log"
  echo "gives you a log in $ldata that may be helpful."
  echo
  echo "The latest information about MySQL is available on the web at"
  echo "http://www.mysql.com"
  echo "Please consult the MySQL manual section: 'Problems running mysql_install_db',"
  echo "and the manual section that describes problems on your OS."
  echo "Another information source is the MySQL email archive."
  echo "Please check all of the above before mailing us!"
  echo "And if you do mail us, you MUST use the /usr/bin/mysqlbug script!"
  exit 1
fi
/////////end of mysql_install_db////////////
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
hmm ... which makes me wonder ... did you install the rpm correctly ??
0
 

Author Comment

by:cozmo_troll
Comment Utility
What? I didn't keep entering in the data, after I received that error I stopped. So I should use this new code instead? Or after? or what? I'm sorry if I'm brain dead, a lot of this just doesn't make sense.

Sorry :(
0
 

Author Comment

by:cozmo_troll
Comment Utility
OK, OK. I do not know what I am doing now. Am I supposed to type in each of the 300 lines of that text individually? It will not allow me to just copy your text and paste it into the code... unless I am doing something wrong.

I don't know how I could possibly install the rpm incorrectly. I just chose the server one first, downloaded it. And then selected the client one and downloaded it.????

Do you really think if I go back and download the other one that it will work?
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
The first set of code goes in /etc/rc.d/init.d/mysqld

the second one goes in /usr/bin/mysql_install_db


What makes me wonder is if you installed mysql correctly from the rpm .... if you didn't, nothing of what I'm posting will help you :(
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
That's why I wanted you to install the binary distribution in the first place :)
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
can you do something for me ? ... type the following command:

locate mysqld
locate safe_mysqld
locate mysql
locate mysql.h

... I want to make sure you installed the rpm correctly!
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
No, just copy&paste !!!!! ... don't type it !! ... you will just loose a lot of time and will be prone to errors!
0
 

Author Comment

by:cozmo_troll
Comment Utility
Ok, I'm installing the regular version now... please hold on. I have a feeling I need help since I have no idea what to do witht he binary version.
0
 

Author Comment

by:cozmo_troll
Comment Utility
While that is installing... how can I copy & paste this when I can't be on the desktop to view the internet? I must be really messed up! The only way I know how to get on the internet after booting the machine is to type startx, and then get on the internet... the only way I know how to type in codes is from the "main screen" which is just black screen with command lines... what am I missing?
0
 

Author Comment

by:cozmo_troll
Comment Utility
I typed those codes... what do you want to know? It pulled up ALOT of lines of codes.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 7

Expert Comment

by:jconde
Comment Utility
don't you have a console client installed with KDE or GNOME ?  .... search for the console client in your graphical environment ! .. If you're under windows, just copy these files into a normal text file and ftp them to your server.  Then move them to the correct place and change the permissions of them with chmod.

0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
are you talking about the locate commads ? ... if so, then that's a good sign.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
If you're going to install a binary version, please remove the rpms first !
0
 

Author Comment

by:cozmo_troll
Comment Utility
I do have a graphical environment, but I do not know which desktop it is, and I do not know what a console client is. I normally work off of a Windows XP, but our server is Linux. I do not know how to ftp them to the server or how to move them to the correct place and change permissions. Please tell me how I can do something productive all from the linux machine or all from my Windows machine (which can view&work on the server through webmin)...

am I talking about locate commands? I have no idea what locate commands are, there was a lot of commands, here is a sample: (I did this on webmin -->shell)

> locate mysqld
/etc/rc.d/init.d/mysqld
/etc/rc.d/rc3.d/S88mysqld
/etc/rc.d/rc5.d/S88mysqld
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/bin/mysqld
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/bin/mysqldump
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/bin/mysqld.sym.gz
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/bin/safe_mysqld
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/bin/mysqld_multi
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/bin/mysqld_safe
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/bin/mysqldumpslow
/root/Desktop/MYSQL/mysql-standard-4.0.14-pc-linux-i686/include/mysqld_error.h
0
 

Author Comment

by:cozmo_troll
Comment Utility
OK... Should I, or shouldn't I install the binary???????? Is the code I pasted above a good thing, or bad thing? Please just tell me (in detail) what to do.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
ok, lets take this a previous step ...

First, is the linux machine there with you (phisically) ?  .. second, do you know what telnet is ? .. is webmin similar to telnet ?

run the following command and tell me what happens:

rpm -q mysql

While on XP, what happens if you go to DOS Prompt and type

telnet ip.of.your.linux.box ?
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
I can't really tell if the code you pasted is good enough or not .... I don't see anyting that comes from the rpm, for which I assume your installation failed !

All I see is you downloaded and extracted a binary version some time ago, but thats basically it :(
0
 

Author Comment

by:cozmo_troll
Comment Utility
1. When I run rpm -q mysql nothing happens. I did install MySQL a while ago (from the other forum with paulamhkg) Maybe it was not deleted off of system, and that caused problems? Please tell me how to get rid of all MySQL so I may start over.

2. I think webmin is similar to telnet. What I do to enter it is I open my web browser and type in http://ip.of.our.linux.box and it pops me right into it.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
ok, if running rpm -q shows nothing, this means you never installed the rpm version of mysql to begin with :(

so, just before we give up on the rpm, ... I need you to do the following:

mv /etc/rc.d/init.d/mysqld /etc/rc.d/init.d/mysqld_bak
rm /usr/bin/mysql_install_db
cd /go/to/the/directory/where/mysql-VERSION.rpm/is/located/at
rpm -i --force --nodeps mysql-VERSION.rpm

and tell me exactly what happens after each step.

The most important one is the last one !



0
 

Author Comment

by:cozmo_troll
Comment Utility
STEP 1: Nothing happened
STEP 2: rm: remove regular file '/usr/bin/mysql_install_db'?
I typed YES
STEP 3: no such file or directory
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
step 3, really means "GO to the directory where you downloaded the mysql-4.0.16 rpm" ...

In one of your posts you said "OK, I've installed both the server & client parts (rpm version) what now?"   ... where did you put those files in ?

How did you install them ? ...


0
 

Author Comment

by:cozmo_troll
Comment Utility
I've got it. These steps are all done. MySQL is removed.

I'm downloading the binary version now... time for bed here. Will you be able to help tomorrow?

Thanks for everything... Linux is very frustrating for me... Windows is so much better. (to me)
:(
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
Yup, I'll be around tomorrow ... same time ... I'll guide you through the binary install ...

later
0
 

Author Comment

by:cozmo_troll
Comment Utility
OK, the binary is installed. What should I do next?
0
 

Author Comment

by:cozmo_troll
Comment Utility
I'm trying to follow the instructions on the MySQL website... this is where I'm at:

groupadd mysql
useradd -g mysql mysql
cd /usr/local --> No such file or directory
0
 

Author Comment

by:cozmo_troll
Comment Utility
Ok, got that part (I moved it to my desktop so I did cd/root/Desktop)
Then:
gunzip < /root/Desktop/mysql-standard-4.0.16-pc-linux-i686.tar.gz | tar xvf -
( A whole bunch of codes scrolled on my screen)
ln -s /root/Desktop/mysql-standard-4.0.16-pc-linux-i686.tar.gz mysql
(nothing changed)
cd mysql ---> no such file or directory
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
ok, first of all, please do it exactly in the paths I tell you to  .... its the standard way of doing things ...

Do exactly the same thing you just did, but instead of /root/Desktop do it in /usr/local

Also, its not ln -s /root/Desktop/mysql-version.TAR.GZ mysql .... its ln -s /root/Desktop/mysql.version mysql

so, anyways, please do this under /usr/local
0
 

Author Comment

by:cozmo_troll
Comment Utility
groupadd mysql -->group mysql exists
useradd -g mysql mysql --> user mysql exists
cd /usr/local --> -bash: cd/usr/local: No such file or directory.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
the first 2 look ok .... regarding the third one ... well, I don't know of any linux instalation that doesn't have a "/usr/local" directory ... specially RedHat 8 which I'm sure it does.

Make sure you write the commands correctly .... aparently what you wrote was "cd/usr/local" or something of the sort.

you need to type:

shell>cd /usr/local
0
 

Author Comment

by:cozmo_troll
Comment Utility
OK, I got it to cd to local.

Next step:
shell>gunzip < /usr/local/mysql-standard-4.0.16-pc-linux-i686.tar.gz mysql
--> no such file or directory
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
you need to move or copy mysql-standard-4.0.16-pc-linux-i686.tar.gz to /usr/local  ... do it

Go to the directory where you placed mysql-standard-4.0.16-pc-linux-i686.tar.gz and then type:

mv mysql-standard-4.0.16-pc-linux-i686.tar.gz /usr/local
0
 

Author Comment

by:cozmo_troll
Comment Utility
OK, then it says Mysql is not a regular file or directory -ignored.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
please tell me exactly what did you type to make that error message appear.
0
 

Author Comment

by:cozmo_troll
Comment Utility
shell>gunzip < /usr/local/mysql-standard-4.0.16-pc-linux-i686.tar.gz mysql
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
do the following ...

go to the directory where mysql-standard-VERSION.tar.gz is  and type the following:

ls -laF mysql-standard-4.0.16-pc-linux-i686.tar.gz
if something other than 'No such file or directory' is returned, then type
mv /mysql-standard-4.0.16-pc-linux-i686.tar.gz /usr/local  (assuming you haven't moved it to /usr/local yet)

then type

tar xfz mysql-standard-4.0.16-pc-linux-i686.tar.gz
then type
ln -fs  mysql-standard-4.0.16-pc-linux-i686 mysql
then type
cd mysql
and read the top part of the INSTALL-BINARY file.

(where it says useradd mysql, groupadd mysql, etc ... don't go through the steps where you need to type 'ln' or 'tar' ... you should have done those already if you followed my above instructions)
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
my previous post has an error:

mv /mysql-standard-4.0.16-pc-linux-i686.tar.gz /usr/local  (assuming you haven't moved it to /usr/local yet)


it should be

mv mysql-standard-4.0.16-pc-linux-i686.tar.gz /usr/local  (assuming you haven't moved it to /usr/local yet)

... again, this only applies if your current directory IS NOT /usr/local

0
 

Author Comment

by:cozmo_troll
Comment Utility
let me just make sure that I know the directory where it is. On my desktop it is in the HOME file. So I did a cd/ root ... is this the correct place?
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
to know which directory you're on type

pwd

the mysql-version.tar.gz file should be in your home directory or in your Desktop directory ... It's also possible that you've moved it already to /usr/local, but I doub't /root is the place to go unless you downloaded the file as a root user while being in the /root directory.  (the same applies to /root/Desktop)
0
 

Author Comment

by:cozmo_troll
Comment Utility
I did download the file as a root user.

cwd = /root
0
 

Author Comment

by:cozmo_troll
Comment Utility
ls -laF mysql-standard-4.0.16-pc-linux-i686.tar.gz

No such file or directory.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
ok, so the question is ... where's the file at ? ... you downloaded somewhere so it must be there!

Search for it or wosrt case, download it again !

The file is in the directory where you downloaded it, regardless of which user you used (unless you used a non privileged user account (i.e. root) and tried saving the file in a directory where you had no read/write permissions on.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
Cozmo, I think at this stage it would be much better for you to get someone to help you by loggin into your system and installing mysql.  Do you _NEED_ to install mysql in your Linux box ? ... why don't you install it in your XP machine ?

That will enable you to try mysql out, test its features and everything and in the mean time, you can start reading some basic linux tutorials.  Linux is not a "hard" OS to learn & work with, but as everything you need to do things one step at a time.
0
 

Author Comment

by:cozmo_troll
Comment Utility
Our Linux machine only has 1 user... that is root. To download the program I logged in as Root, typed shell>startx and went onto the MySQL webpage and downloaded the file. I can SEE IT on the screen. I click "HOME" and there it is.

I cannot load it on my XP machine becuase we only need this program to use for an intranet that is all ready to go... Apache is ready, etc. etc. MySQL is the only program that we are having problems with. Why? I do not know!

Can I load this program from the DESKTOP? If so, HOW? This would be better because I can work with the file that is actually visible.

Thanks
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
Ok, do the following ...

log into your computer with the command terminal (the black screen without using start x)

type the following:

cd
cd Desktop
ls -laF
and tell me if you see the mysql file there ...
0
 

Author Comment

by:cozmo_troll
Comment Utility
YES! It is blinking.
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
good, now do the following:

mv mysql-standard-4.0.16-pc-linux-i686.tar.gz /usr/local
cd /usr/local
tar xfz mysql-standard-4.0.16-pc-linux-i686.tar.gz
ln -fs  mysql-standard-4.0.16-pc-linux-i686 mysql
cd mysql


let me know when you have accomplished that !
0
 

Author Comment

by:cozmo_troll
Comment Utility
Sorry jconde! I didn't know that you responded to me. so far I typed:

mv mysql-standard-4.0.16-pc-linux-i686.tar.gz /usr/local
 --> mv cannot stat 'mysql-standard-4.0.16-pc-linux-i686.tar.gz' No such file or directory
0
 
LVL 7

Expert Comment

by:jconde
Comment Utility
why ?? ... you said "YES! It is blinking" ... which I took for granted that you saw it right there !!!

do a cd Desktop and then issue the mv command.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now