how to change the owner of a database

This is a discussion on how to change the owner of a database within the MySQL Database forums, part of the Database Forums category; Hello, I am a newbie using mySQL. I have exported a database with an administrative user. The owner of this ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-18-2007
Ricardo Pan
 
Posts: n/a
Default how to change the owner of a database

Hello,

I am a newbie using mySQL.

I have exported a database with an administrative user.
The owner of this database was user1.

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

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?

Thank you in advance,
Ricardo PAN
Reply With Quote
  #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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0