Can't run mysql_fix_privilege_tables

General Discussion of atomic repo and development projects.

Ask for help here with anything else not covered by other forums.
Brent
Forum User
Forum User
Posts: 68
Joined: Tue Dec 21, 2004 11:40 pm

Can't run mysql_fix_privilege_tables

Unread post 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)
Brent
Forum User
Forum User
Posts: 68
Joined: Tue Dec 21, 2004 11:40 pm

Unread post 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)
kilgore
Forum User
Forum User
Posts: 53
Joined: Sat Dec 04, 2004 4:37 am

Unread post 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 ;)
carlswart
Forum User
Forum User
Posts: 20
Joined: Sun Dec 19, 2004 2:41 am
Location: South Africa

Unread post 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.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

for the truly lazy:
mysql_fix_privilege_tables --user=admin --password=`cat /etc/psa/.psa.shadow`
ryanz
Forum User
Forum User
Posts: 68
Joined: Mon Dec 20, 2004 2:43 am

Unread post 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'
------------------------------------------------------------------------
kilgore
Forum User
Forum User
Posts: 53
Joined: Sat Dec 04, 2004 4:37 am

Unread post by kilgore »

Yes everything is ok :

You can ignore any Duplicate column errors
Post Reply