MySQL Forums
Forum List  »  Install & Repo

Re: Can't get MySQL 5.5 to install on Windows 7
Posted by: Chris Besant
Date: December 23, 2010 12:13PM

Hi, Furio:

I submitted this as a bug in the MySQL bug database. See: http://bugs.mysql.com/bug.php?id=59038

As it turns out, this is a pretty simple matter. All that happens is that if you ask the wizard to "Allow root access from a remote computer" and/or "Create Anonymous User", the wizard errors out when trying to insert entries for those into the mysql.user table. This only happens if you've the default to enable strict mode.

The only reason the wizard has the error is because it does not supply a value for the authentication_string column when trying to add those entries using INSERT statements. As you can just log in as root@localhost after the wizard completes, error or not, and add whatever user entities you require using CREATE USER or GRANT (or a GUI tool that knows about the authentication_string column), there really are no long term effects and you don't even need to modify the table definition to make authentication_string nullable.

While I still think it's paranoia worrying about this column being left null, I do agree in principle that it is generally not a good idea to be modifying the DDL of system tables. It's hard for me to imagine what such software might be doing, but there is the risk in leaving authentication_string nullable that somewhere down the line you will run some software that assumes it never contains a null value as it is marked not null in the distribution. Such software might then blow up on encountering a null value for authentication_string.

The obvious fix is to ensure all authentication_string entries have a value:
USE mysql;
UPDATE USER SET authentication_string = '' WHERE authentication_string IS NULL;

Then set authentication_string back to NOT NULL:
USE mysql;
ALTER TABLE user
CHANGE authentication_string authentication_string TEXT NOT NULL;

The one caveat about making the authentication_string column NOT NULL again is that you need to consider any software in use on your system which adds users. While it certainly isn't a best practice, there is software out there that performs INSERT operations directly on the user table rather than the CREATE USER or GRANT syntax. Even the MySQL documentation provides examples of using INSERT directly on the user table, and witness the Configuration Wizard itself! If your system includes such software and you must continue to use it, making the authentication_string column NOT NULL again may cause it to error out just like the wizard. One solution that would allow you to keep that column NOT NULL and still use the other software would be to add a BEFORE INSERT trigger on the user table that inspects the incoming value for authentication_string and sets it to the empty string if it is null.

Options: ReplyQuote


Subject
Written By
Posted
Re: Can't get MySQL 5.5 to install on Windows 7
December 23, 2010 12:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.