Unix Technical Forum

how to change the owner of a database

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


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:30 AM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:30 AM
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?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:33 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com