Bug #17446 Several errors in mysql_fix_privilege_tables.sql, also missing scripts
Submitted: 16 Feb 2006 10:18 Modified: 17 Feb 2006 11:59
Reporter: Evgueny Antonoff Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.18-nt OS:Windows (WindowsXP (home))
Assigned to: CPU Architecture:Any

[16 Feb 2006 10:18] Evgueny Antonoff
Description:
Hello,

What I am about to report is result of whole day efforts, google.com, forums.mysql.com, bugs.mysql.com....

Summary of problems:
================
1. Minor problem: Missing "MySQL Server 5.0\scripts\" directory
2. Problem: Errors in mysql_fix_privilege_tables.sql

How to repeat:
Details
================

My box: WinXP (home), MySQL Administrator 1.1.8, MySQL Server 5.0.18-nt
( server and administrator are downloaded yesterday )

1. The minor problem is that the directory
\blah...\MySQL Server 5.0\scripts\
including all its contents is NOT included in the full version of the server package ( the zip file ), it is only included in the "windows essentials" version of the package, thus resulting people, who encounter the problem, explained in section 5.4 of MySQL Manual ( section 5.6 in the last manual version, found online ), to desperately look around, as for a needle in a hash.

I first downloaded the full version, uninstalled server v.4.1, had exported all databases already. Did a clean install, reimpoted all databases back, and took me almost a day to determine, that the manual explains the Administrator problem and tells fixing with one of the scripts included in scripts/

Anyway, then I downloaded the "windows essentials" version, and did a clean install again ( i did several clean installs that day to be sure, that no left data may cause a problem ). This time the scripts/ directory was there with 3 files inside:

Directory of C:\Program Files\MySQL\MySQL Server 5.0\scripts

15.02.2006 г.  22:53    <DIR>          .
15.02.2006 г.  22:53    <DIR>          ..
21.12.2005 г.  20:39               210 fill_help_tables.sql
21.12.2005 г.  20:39            25 082 mysql_fix_privilege_tables.sql
21.12.2005 г.  20:40             2 221 mysql_prepare_privilege_tables_for_5.sql
               3 File(s)         27 513 bytes
               2 Dir(s)     534 986 752 bytes free

I logged as root and started to execute the scripts:
fill_help_tables.sql -- Ok.
mysql_prepare_privilege_tables_for_5.sql -- Ok.
mysql_fix_privilege_tables.sql -- This resulted several errors.

2. So we come to the actual problem. Here are the details:
( the databases I reimported, were created on my previous mysql server v.4.1. )

( see attachments now )

Hope my information was enough to reproduce all...

Would help alot if You also could help me fixing my database structure, if it still not ok.

Finally last night decided to test anyway the databases.

Did very quick tests:
Mysql Administrator was behaving ok
Have bugzilla and mediawiki, tried to login and interfere around, seemed ok.

Just these errors on the script run bothers me a bit...

Regards: Evgueny

Suggested fix:
Have no idea.
[16 Feb 2006 10:26] Evgueny Antonoff
result of running mysql_fix_privilege_tables.sql

Attachment: script_errors.txt (text/plain), 6.64 KiB.

[16 Feb 2006 10:34] Evgueny Antonoff
my current structure of database 'mysql'

Attachment: database_curr_struct.sql (application/octet-stream, text), 15.98 KiB.

[16 Feb 2006 10:35] Evgueny Antonoff
initial structure of database 'mysql' ( before running any script )

Attachment: database_init_struct.sql (application/octet-stream, text), 14.81 KiB.

[16 Feb 2006 10:36] Evgueny Antonoff
contents of mysql_fix_privilege_tables.sql as i ran it against my database

Attachment: mysql_fix_privilege_tables.sql (application/octet-stream, text), 25.10 KiB.

[17 Feb 2006 11:59] Valeriy Kravchuk
Thank you for a problem report. Sorry, but I was not able to get the problem with \scripts subdirectory you described. I've just reinstalled 5.0.18 (successfully, from zip file), after removing c:\Program Files\MySQL\MySQL Server 5.0\ completely, and got the following files there:

 Содержимое папки C:\Program Files\MySQL\MySQL Server 5.0\scripts

17.02.2006  11:35    <DIR>          .
17.02.2006  11:35    <DIR>          ..
21.12.2005  20:39               210 fill_help_tables.sql
21.12.2005  20:49            12 021 make_binary_distribution
21.12.2005  20:49             2 000 make_sharedlib_distribution
21.12.2005  20:49             9 856 make_win_src_distribution
21.12.2005  20:49             1 468 msql2mysql
21.12.2005  20:49           110 679 mysqlaccess
21.12.2005  20:39             1 702 mysqlaccess.conf
21.12.2005  20:49             9 698 mysqlbug
21.12.2005  20:49             6 160 mysqldumpslow
21.12.2005  20:49            23 263 mysqld_multi
21.12.2005  20:49            12 896 mysqld_safe
21.12.2005  20:49            32 837 mysqlhotcopy
21.12.2005  20:49             4 649 mysql_config
21.12.2005  20:49             2 977 mysql_convert_table_format
21.12.2005  20:49            36 201 mysql_create_system_tables
21.12.2005  20:49            10 419 mysql_explain_log
21.12.2005  20:49             2 653 mysql_find_rows
21.12.2005  20:49             9 698 mysqlbug                               1
21.12.2005  20:49             6 160 mysqldumpslow
21.12.2005  20:49            23 263 mysqld_multi
21.12.2005  20:49            12 896 mysqld_safe
21.12.2005  20:49            32 837 mysqlhotcopy
21.12.2005  20:49             4 649 mysql_config
21.12.2005  20:49             2 977 mysql_convert_table_format
21.12.2005  20:49            36 201 mysql_create_system_tables
21.12.2005  20:49            10 419 mysql_explain_log
21.12.2005  20:49             2 653 mysql_find_rows
21.12.2005  20:49               483 mysql_fix_extensions
21.12.2005  20:49             5 151 mysql_fix_privilege_tables
21.12.2005  20:39            25 082 mysql_fix_privilege_tables.sql
21.12.2005  20:49             8 780 mysql_install_db
21.12.2005  20:40             2 221 mysql_prepare_privilege_tables_for_5.sql
21.12.2005  20:49             6 308 mysql_secure_installation
21.12.2005  20:49            17 275 mysql_setpermission
21.12.2005  20:49            14 476 mysql_tableinfo
21.12.2005  20:49             3 118 mysql_zap

So, all scripts are there.

As for this:

mysql_fix_privilege_tables.sql -- This resulted several errors.

Please, send or upload the real errors you got (after successful installation of 5.0.18, surely). Please, note also, that the only recommended way to upgrade from 4.1. to 5.0 is dump all your data in 4.1 and restore them in 5.0.