Move mysql database to another user

I dont know how many times we had to tell you :cool:
you keep trying to prove yourself right, and you miss the important part of my replies:
OK, you were right.
manually changing the DBname did the trick.

shouldn't this be taken care of by the script...?

I'm just trying to figure out, if this is a normal behavior or the script is doing something wrong...
 
I have to agree with MtK......

Unless its a bug, whats the point in the script moving the database user name without the databases?.... Surely the script could check all the database names that has, i.e mtk_, at the beginning and changhing them to the new name, i.e mtk2_, etc, without manually doing it.

Or have I misread the thread?
 
Move just one DB to other user...

I just tried this, but it moved all the db's from one user to the other.
I just need to move one db to a new user

situation:
In an account with multiple domains and db's i need to move one domain with db to a new account.


thanx in advance!
 
Does anyone now if you can do this by simply changing the name of the database in your mysql directory? I haven't tested it. If you do this you should stop mysql before doing it and restart it afterwards. Be sure to make backups; I don't know if this is going to break anything.

If this doesn't work then the only way I know how to do it is at user level, first dump mysql from one user and then restore it to another.

Jeff
 
Does anyone now if you can do this by simply changing the name of the database in your mysql directory?

Yes, I know that and I did it several times for MyISAM only databases. But Directadmin Staff does not recommend doing this, as it is not the proper way to re-name DBs and might bring unexpected issues. There was related discussion here, you might want to find it for more detailed answer from John.
 
First of all, why is the script asking for an (old) username and a new username, but not a (old) database name and a new database name? As second, do I've to create the new user (and database)? And third, with or without the new username/database created, the script returns without any results.

What is a proper solution for this problem? Or what is the correct way of using the script?

Situation:
Code:
Old directadmin user: foo
Old database name: foo_db
Old database user: foo_user
Code:
Old directadmin user: bar
Old database name: bar_db
Old database user: bar_user
 
...
Code:
Old directadmin user: bar
Old database name: bar_db
Old database user: bar_user

Woops, the last code block is about the new database of course :D

Code:
New directadmin user: bar
New database name: bar_db
New database user: bar_user
 
Hello,

This is almost 3 years old thread. What script are you referring to?


Dont know but im now looking at it and must agree that it would be cool to have a way to easily move databases.

I have a handfull of domains i want to move, but without db it has no point.

A combination of move user script and move database script would be handy,

U guess that script has not been looked at for a while, but it would an addition.

Moving only the domain folder and the domain itself was nice in 2007, but does not cut it now.

Would it be posible to:

run the move user script and ask if we want to move databases
(script logs in to mysql qs the user and returns a list of available DBs)
we select the ones we want to move

Voila ))


Is that technically posible?
 
Back
Top