?
Solved

MySQL Newbie question about OLD_PASSWORD

Posted on 2005-03-22
2
Medium Priority
?
769 Views
Last Modified: 2008-02-01
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>
0
Comment
Question by:neiljstandley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
JesterToo earned 2000 total points
ID: 13608817
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
 

Author Comment

by:neiljstandley
ID: 13614464
Thanks!
 I know it was an easy 500 but it was urgent for me.  Unhappy customers are no fun.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question