2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2020

03/03/2003: How do I Reset the Root password of MySQL Using Linux?

How do I Reset the Root password of MySQL Using Linux?

  1. /usr/local/mysql/bin/safe_mysqld --skip-grant-tables &
  2. /usr/local/mysql
  3. use mysql;
  4. update user set password = password('.......') where user = 'root' and host='localhost';
  5. Stop and Start the MySQL server. [2003Oct03 Note] A reader mentioned that it is easier to 'flush privileges' instead of restarting the server.

03/03/2003: How do I Set the CLASSPATH Variable Using Linux?

How do I Set the CLASSPATH Variable Using Linux?

Create a file called /etc/profile.d/jdk.sh and fill it with this:

  if [ -z "${JAVA_HOME}" ] ; then
    export JAVA_HOME=/usr/lib/jdk116
  fi
  if [ -z "${JDK_HOME}" ] ; then
    export JDK_HOME=/usr/lib/jdk116
  fi
  SW=`cat /etc/profile.d/java`
  SW=`echo ${SW}  | sed -e "s/ /:/g"`
  MYPATH="${JDK_HOME}/lib/classes.zip:${SW}"
  export CLASSPATH="${MYPATH}"
  MYPATH="${JDK_HOME}/bin/"
  echo ":${PATH}:"| grep "${MYPATH}" >/dev/null ||\
    PATH="${PATH}:${MYPATH}"

  export PATH
  unset SW MYPATH

Create a file called /etc/profile.d/javaM and fill it with a list of directories, jars, and zips.