View Single Post

  #2 (permalink)  
Old 12-19-2007
Gordon Burditt
 
Posts: n/a
Default Re: how to change the owner of a database

>I am a newbie using mySQL.
>
>I have exported a database with an administrative user.
>The owner of this database was user1.


What does "owner of this database" mean? There's no such concept
in the MySQL permission system. And how did you figure out that
user1 owned a particular database? Do you mean that the export
file created was owned by the OS user 'user1'?

>But I would like to import this same database with user2.


If this is an issue of OS file ownership, run the export as user2.

Note: OS users and MySQL users are not necessarily related to each
other and there need not be any overlap between the names. A given
OS user can run as any MySQL user (assuming he knows the password)
using the -u and -p options to the MySQL command-line utility or
mysqldump.

>I could import it (using the administrative user), but when I tried to
>use it (with user2), I don`t have permission for that.
>Even giving administrative permission for that user.
>
>How could I do it inside mysql?

Reply With Quote