MySQL Newbie question about OLD_PASSWORD

Loaded MySQL 4.1.10a Essential on a Windows 2003 Server due to a request to host a website integrated w/MySQL.
Created the database & loaded the sql dump but ran into an error attempting to create user.  I was told by the developer that I would have to use OLD_PASSWORD since the database was created on 4.0.  I attempted to RTFM but with only an hour of exposure to MySQL I thought that someone might be able to save a newbie some time.  

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.10a-nt
mysql> USE mysql;
Database changed
mysql> GRANT USAGE ON * . * TO 'vinyl_table'@'localhost' IDENTIFIED BY OLD_PASSWORD('WonerPoodle') WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 ;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'OLD_PASSWORD('WonderPoodle') WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0' at line 1
mysql>
neiljstandleyAsked:
Who is Participating?
 
JesterTooConnect With a Mentor Commented:
I think you only need to use this syntax for granting privileges to accounts where the user is connecting with OLD client software... that which predates MySQL 4.1

Try using the native 4.1x syntax as documented here...

13.5.1.3. GRANT and REVOKE Syntax

GRANT priv_type [(column_list)] [, priv_type [(column_list)]] ...
    ON {tbl_name | * | *.* | db_name.*}
    TO user [IDENTIFIED BY [PASSWORD] 'password']
        [, user [IDENTIFIED BY [PASSWORD] 'password']] ...
    [REQUIRE
        NONE |
        [{SSL| X509}]
        [CIPHER 'cipher' [AND]]
        [ISSUER 'issuer' [AND]]
        [SUBJECT 'subject']]
    [WITH [GRANT OPTION | MAX_QUERIES_PER_HOUR count |
                          MAX_UPDATES_PER_HOUR count |
                          MAX_CONNECTIONS_PER_HOUR count |
                          MAX_USER_CONNECTIONS count]]

You can omit the [IDENTIFIED BY [PASSWORD] 'password'] clause and use the SET PASSWORD FOR user = PASSWORD('some password') statement instead.

HTH,
Lynn
0
 
neiljstandleyAuthor Commented:
Thanks!
 I know it was an easy 500 but it was urgent for me.  Unhappy customers are no fun.
0
All Courses

From novice to tech pro — start learning today.