Skip to content

Settings and activity

3 results found

  1. 77 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    gr8kodr commented  · 

    Drag and Drop across connections would seem dangerous to me, if one connection drops out there would be a high risk of data corruption or loss

    Surely in this instance the "old" way of exporting to file and importing to new connection would be safer?

    Also, I can't see how D&D between SQL versions on the same machine would be safe either ... surely that would make it too simple to retain obsolete schema structures and possibly "break" the new DB without being able to (easily) distinguish what causes the breakage

  2. 227 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    An error occurred while saving the comment
    gr8kodr commented  · 

    [QUOTE] From the MySQL Manual
    RENAME DATABASE Syntax
    RENAME {DATABASE | SCHEMA} <db_name> TO <new_db_name>;

    This statement was added in MySQL 5.1.7 but was found to be dangerous and was removed in MySQL 5.1.23. It was intended to enable upgrading pre-5.1 databases to use the encoding implemented in 5.1 for mapping database names to database directory names. However, use of this statement could result in loss of database contents, which is why it was removed. Do not use RENAME DATABASE in earlier versions in which it is present.

    To perform the task of upgrading database names with the new encoding, use ALTER DATABASE <db_name> UPGRADE DATA DIRECTORY NAME instead
    [END QUOTE]

    In a round about manner, I was able to perform a Database rename (outlined below) within the IDE. However, for a large database with many tables, I can see that my technique is far from optimal ...

    1. Create new DB -> `database1`
    2. Add a couple of dummy tables (tbl1, tbl2)
    3. Create a new DB `database2`
    4. Duplicate the tables from database1 into database2 (individually)
    5. DROP `database1`

    I believe that PhpMyAdmin uses the recipe above to perform the same task with the modification that it allows you move all tables to into the new DB by selecting each table behind the scenes

  3. 3 votes
    Vote

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    How important is this to you?

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)
    gr8kodr shared this idea  ·