Bug #2474 Updating priviledges tables on 4.0.17 from 3.23.58 Windows Version
Submitted: 21 Jan 2004 17:48 Modified: 30 Jan 2004 8:10
Reporter: Lyle Dove Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:4.0.17 OS:Windows (Windows 2k)
Assigned to: Greg Weir CPU Architecture:Any

[21 Jan 2004 17:48] Lyle Dove
Description:
In trying to run the update for the priviledges table, I get an error when trying to execute it.  I am upgrading from 3.23.58 to 4.0.17.  Everything was upgraded normally except the priviledges tables.  I keep receiving an error when executing the script as stated in the documentation above.  It doesn't appear that the string $1 for the password is intercepting it when I enter the mysql statement.  The script just returns errors, and no tables are updated.  Any ideas?

How to repeat:
Upgrade from 3.23.58 to 4.0.17 Windows version using the installer compile.  Run the cmd mysql -u root -p mysql.   It asks for the password.  I enter the password, and the mysql> prompt comes up.  I then run the script as stated in the documentation for updating windows platform priviledge tables as such.

Here is the process I followed.

-<SNIP>-
On Windows systems, there isn't an easy way to update the grant tables until MySQL 4.0.15. From version 4.0.15 on, MySQL distributions include a mysql_fix_privilege_tables.sql SQL script that you can run using the mysql client. If your MySQL installation is located at `C:\mysql', the commands look like this: 

C:\mysql\bin> mysql -u root -p mysql

mysql> SOURCE C:\mysql\scripts\mysql_fix_privilege_tables.sql
If your installation is located in some other directory, adjust the pathnames appropriately. 

The mysql command will prompt you for the root password; enter it when prompted. 

As with the Unix procedure, you may see some Duplicate column name warnings as mysql processes the statements in the mysql_fix_privilege_tables.sql script; they can be ignored. 

After running the script, stop the server and restart it. 

-<SNIP>-

In my case, the only difference was that mysql is installed on the D: drive, but the path is the same other than that.  It appears to me that the script isn't designed for windows, and needs to be adjusted for the windows platform.
[22 Jan 2004 10:43] Lyle Dove
Problem was resolved.  When using the Windows installer version of the 4.0.17 release, it did not include the mysql_fix_privilege_tables.sql file in the installation.  I downloaded the non-installer version, and copied the script from it and placed it in the installed scripts folder, then executed the cmds.  It updated successfully.  My suggestion is to review the installer version of the 4.0.17 release to insure all files are in it.
[22 Jan 2004 10:51] MySQL Verification Team
I am assign Greg our Product Eng. for to verify it in the next release.
Thank you for the report.
[30 Jan 2004 8:10] Greg Weir
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html