Page 1 of 1

Can't run mysql_fix_privilege_tables

Posted: Thu Dec 23, 2004 4:00 am
by Brent

Code: Select all

[admin@plain admin]$ mysql_fix_privilege_tables
This scripts updates the mysql.user, mysql.db, mysql.host and the
mysql.func tables to MySQL 3.22.14 and above.

This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23

If you get 'Access denied' errors, you should run this script again
and give the MySQL root user password as an argument!
Converting all privilege tables to MyISAM format
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

If your tables are already up to date or partially up to date you will
get some warnings about 'Duplicated column name'. You can safely ignore these!
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

Creating Grant Alter and Index privileges if they don't exists
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

Adding columns needed by GRANT .. REQUIRE (openssl)
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

Creating the new table and column privilege tables
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
Changing name of columns_priv.Type -> columns_priv.Column_priv
You can ignore any Unknown column errors from this
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

Fixing the func table
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

Adding new fields used by MySQL 4.0.2 to the privilege tables
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

Posted: Thu Dec 23, 2004 4:01 am
by Brent
Ran it with -ppassword

Code: Select all

[admin@plain admin]$ mysql_fix_privilege_tables -p********
This scripts updates the mysql.user, mysql.db, mysql.host and the
mysql.func tables to MySQL 3.22.14 and above.

This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23

If you get 'Access denied' errors, you should run this script again
and give the MySQL root user password as an argument!
Converting all privilege tables to MyISAM format
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

If your tables are already up to date or partially up to date you will
get some warnings about 'Duplicated column name'. You can safely ignore these!
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Creating Grant Alter and Index privileges if they don't exists
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Adding columns needed by GRANT .. REQUIRE (openssl)
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Creating the new table and column privilege tables
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
Changing name of columns_priv.Type -> columns_priv.Column_priv
You can ignore any Unknown column errors from this
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Fixing the func table
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Adding new fields used by MySQL 4.0.2 to the privilege tables
You can ignore any Duplicate column errors
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Posted: Thu Dec 23, 2004 5:25 am
by kilgore
Edit the script (with vi or another text editor).

And set the login value to admin and the password value to the value of your Plesk Admin password.

Save the changes and run the script again ;)

Posted: Thu Dec 23, 2004 5:29 am
by carlswart
You should only run it as:

Code: Select all

mysql_fix_privilege_tables <password>
where <password> is your actual password for the root@localhost account.

If you are running PSA you should use the following command:

Code: Select all

mysql_fix_privilege_tables --user=admin --password=<password>
where <password> is your actual password for the admin@localhost account.

Posted: Thu Dec 23, 2004 11:00 am
by scott
for the truly lazy:
mysql_fix_privilege_tables --user=admin --password=`cat /etc/psa/.psa.shadow`

Posted: Thu Dec 23, 2004 12:01 pm
by ryanz
It seems the below messages mean it went OK?


--------------------------------------------------------
This scripts updates the mysql.user, mysql.db, mysql.host and the
mysql.func tables to MySQL 3.22.14 and above.

This is needed if you want to use the new GRANT functions,
CREATE AGGREGATE FUNCTION or want to use the more secure passwords in 3.23

If you get 'Access denied' errors, you should run this script again
and give the MySQL root user password as an argument!
Converting all privilege tables to MyISAM format

If your tables are already up to date or partially up to date you will
get some warnings about 'Duplicated column name'. You can safely ignore these!
ERROR 1060 at line 2: Duplicate column name 'File_priv'

Creating Grant Alter and Index privileges if they don't exists
You can ignore any Duplicate column errors
ERROR 1060 at line 1: Duplicate column name 'Grant_priv'
ERROR 1060 at line 2: Duplicate column name 'Grant_priv'
ERROR 1060 at line 3: Duplicate column name 'Grant_priv'

Setting default privileges for the new grant, index and alter privileges

Adding columns needed by GRANT .. REQUIRE (openssl)
You can ignore any Duplicate column errors
ERROR 1060 at line 1: Duplicate column name 'ssl_type'

Creating the new table and column privilege tables
Changing name of columns_priv.Type -> columns_priv.Column_priv
You can ignore any Unknown column errors from this
ERROR 1054 at line 1: Unknown column 'Type' in 'columns_priv'

Fixing the func table
You can ignore any Duplicate column errors
ERROR 1060 at line 1: Duplicate column name 'type'

Adding new fields used by MySQL 4.0.2 to the privilege tables
You can ignore any Duplicate column errors
ERROR 1060 at line 1: Duplicate column name 'Show_db_priv'

Updating new privileges in MySQL 4.0.2 from old ones

ERROR 1060 at line 1: Duplicate column name 'max_questions'
ERROR 1060 at line 1: Duplicate column name 'Create_tmp_table_priv'
ERROR 1060 at line 4: Duplicate column name 'Create_tmp_table_priv'
ERROR 1061 at line 5: Duplicate key name 'Grantor'
------------------------------------------------------------------------

Posted: Thu Dec 23, 2004 3:51 pm
by kilgore
Yes everything is ok :

You can ignore any Duplicate column errors