WordPress.org

Ready to get started?Download WordPress

Forums

Moving mysql database tables from one database to another (8 posts)

  1. drmike
    Member
    Posted 7 years ago #

    Greets:

    Anyone know of a method for moving database tables from one database to another database without exporting?

    thanks,
    -drmike

  2. MichaelH
    Member
    Posted 7 years ago #

    ODBC?

  3. MichaelH
    Member
    Posted 7 years ago #

    Or couldn't you try just copying .frm .MYI .MYD files from one place to another.

  4. drmike
    Member
    Posted 7 years ago #

    Oh sorry. No root access. Trying to do this in php actually.

    I probably could get my host to run a script though that would manually move the files. Wouldn't that muck up the index of the table though? (ie the index knows what tables it has?)

    Too many foreign characters in the database. If I export it and then reimport it, something always gets encoded even if I check first.

    Thanks,
    -drmike

  5. whooami
    Member
    Posted 7 years ago #

    you can move a table that exists within one databse, ie wp_blah to another database, ie wp2_blah from within phpmyadmin, as long as the other database already exists.

    It's done under operations, once you have clicked on have the table you want to move up in your browser.

    There is :

    Move table to (database.table): ....

    and

    Copy table to (database.table): ...

    each contains a drop down box that shows the already created databases.

  6. drmike
    Member
    Posted 7 years ago #

    Yeah, I remember that feature and took a look but I don't have it in our 2.9.0.2. I remember a fair number of issues with it and could have sworn that they removed it from later versions. (I don't follow their development closely so I couldn't tell you.)

    Granted they're up to 2.10.2 so it may be back in there.

    edit: I stand corrected. It's in there for each individual table. Better than nothing I guess. Maybe I can test it and figure out some sort of automated command to write a script from it....

    Thanks,
    -drmike

  7. ccoupe
    Member
    Posted 7 years ago #

    Be careful. As you noted moving from one DB version to another can introduce character conversion problems. Going from say 5.x to 4.x - don't do it - and I you do, moving that mess back to 5.x just makes it worse. Much worse. Been there, still am there but it's a low priority for me.

  8. drmike
    Member
    Posted 7 years ago #

    Same database engine. Just different databases within that engine.

    Yeah but it has to be done.

    I'd rather just move the files but I don't know if I can get access or if my host will truct me with a script in that part of her box.

Topic Closed

This topic has been closed to new replies.

About this Topic