#!/bin/sh root_password="$1" host="localhost" user="root" if test -z "$1" ; then cmd="@bindir@/mysql -f --user=$user --host=$host mysql" else root_password="$1" cmd="@bindir@/mysql -f --user=$user --password=$root_password --host=$host mysql" fi # Debian addition if [ "$1" = "--sql-only" ]; then root_password="" cmd="/usr/share/mysql/echo_stderr" fi echo "This scripts updates the mysql.user, mysql.db, mysql.host and the" echo "mysql.func tables to MySQL 3.22.14 and above." echo "" echo "This is needed if you want to use the new GRANT functions," echo "CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23" echo "" echo "If you get 'Access denied' errors, you should run this script again" echo "and give the MySQL root user password as an argument!" echo "Converting all privilege tables to MyISAM format" $cmd < Grant # and Create -> Alter, Index, References if test $res = 0 then echo "Setting default privileges for the new grant, index and alter privileges" $cmd < Column_priv from MySQL 3.22.12 # echo "Changing name of columns_priv.Type -> columns_priv.Column_priv" echo "You can ignore any Unknown column errors from this" $cmd <""; END_OF_DATA echo "" fi # Add fields that can be used to limit number of questions and connections # for some users. $cmd <