#!/bin/sh echo "This scripts updates the mysql.user, mysql.db, mysql.host and the" echo "mysql.func table to MySQL 3.22.14 and above." echo "" echo "This is needed if you want to use the new GRANT functions or" echo "want to use the more secure passwords." echo "" echo "If you get Access denied errors, you should run this script again" echo "and give the MySQL root user password as a argument!" root_password="$1" host="localhost" # Fix old password format, add File_priv and func table echo "" echo "If your tables are already up to date or partially up to date you will" echo "get some warnings about 'Duplicated column name' or" echo "'Table 'func' already exists'. You can safely ignore these!" @bindir@/mysql -f --user=root --password="$root_password" --host="$host" mysql < Grant # and Create -> Alter, Index, References if test $res = 0 then echo "Setting default privileges for the new grant, index and alter privileges" @bindir@/mysql --user=root --password="$root_password" --host="$host" mysql < Column_priv from MySQL 3.22.12 # echo "Changing name of columns_priv.Type -> columns_priv.Column_priv" echo "You can ignore any errors from this" @bindir@/mysql -f --user=root --password="$root_password" --host="$host" mysql <