[DOC] SQL to create backup user syntax error on v5.1

Bug #1088967 reported by David I
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Medium
Hrvoje Matijakovic

Bug Description

[In:Percona XtraBackup Documentation]

I tried executing the following SQL on MySQL v5.1 and got an error:

CREATE USER 'backup'@'localhost' IDENTIFIED BY 'secret!';
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'backup';

Error: General error message from server: "Can't revoke all privileges for one or more of the requested users"
SQLState: S1000
ErrorCode: 1269
Error occured in:
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'backup'

Tags: doc

Related branches

Revision history for this message
David I (david-ishee) wrote :
Revision history for this message
David I (david-ishee) wrote :

I was logged in as the 'root' user at the time.

Revision history for this message
David I (david-ishee) wrote :

I skipped the REVOKE command and moved on with the GRANT statement and it worked.

Revision history for this message
Miguel Angel Nieto (miguelangelnieto) wrote :

It should be:

mysql> CREATE USER 'bkpuser'@'localhost' IDENTIFIED BY 's3cret';
mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bkpuser'@'localhost';
mysql> GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'bkpuser'@'localhost';
mysql> FLUSH PRIVILEGES;

The problem in the documentation is that first we create the user 'bkpuser'@'localhost' and then try to revoke privileges from 'bkuser'. Those are different users.

Changed in percona-xtrabackup:
status: New → Confirmed
Revision history for this message
David I (david-ishee) wrote : Re: [Bug 1088967] Re: [DOC] SQL to create backup user syntax error on v5.1

That may be true in your documentation too, but I used a different username
as shown below so they matched in my case.

On Thursday, January 3, 2013, Miguel Angel Nieto <email address hidden>
wrote:

> It should be:
>
> mysql> CREATE USER 'bkpuser'@'localhost' IDENTIFIED BY 's3cret';
> mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'bkpuser'@'localhost';
> mysql> GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'bkpuser'@
> 'localhost';
> mysql> FLUSH PRIVILEGES;
>
> The problem in the documentation is that first we create the user
> 'bkpuser'@'localhost' and then try to revoke privileges from 'bkuser'.
> Those are different users.
>
> ** Changed in: percona-xtrabackup
> Status: New => Confirmed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1088967
>
> Title:
> [DOC] SQL to create backup user syntax error on v5.1
>
> Status in Percona XtraBackup:
> Confirmed
>
> Bug description:
> [In:Percona XtraBackup Documentation]
>
> I tried executing the following SQL on MySQL v5.1 and got an error:
>
> CREATE USER 'backup'@'localhost' IDENTIFIED BY 'secret!';
> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'backup';
>
>
> Error: General error message from server: "Can't revoke all privileges
> for one or more of the requested users"
> SQLState: S1000
> ErrorCode: 1269
> Error occured in:
> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'backup'
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/percona-xtrabackup/+bug/1088967/+subscriptions
>

--
David

Changed in percona-xtrabackup:
assignee: nobody → Hrvoje Matijakovic (hrvojem)
Changed in percona-xtrabackup:
status: Confirmed → In Progress
importance: Undecided → Medium
Changed in percona-xtrabackup:
status: In Progress → Fix Committed
Stewart Smith (stewart)
Changed in percona-xtrabackup:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-610

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.