[EN] Migrating a database from MySQL 5.0/5.1 to MySQL 5.7

This migration can be done via Webadmin. Steps are the same for different database versions, although only migrating to a newer version is typically supported.

 
  1. Log in to Webadmin

  2. Choose your domain and open the Databases section

  3. Find the database you with to migrate, and select Manage -> Duplicate

  4. A dialog informing you that a backup will have to be created is shown, this is OK. Click continue.

  5. On the next screen, pick the target database type, choose a name and password (or accept / generate random ones) and click on Create. 

    You’ve just created a new database. To check whether everything is OK with your new database, try logging into PhpMyAdmin at db57.websupport.sk (if you picked MySQL 5.7).

     

    Now the only remaining step is updating the configuration of your website to connect to the newly created database - you may use our how-to to check out the necessary steps.

     

    If your website is running fine on your new database, you may delete the original database at any time - by following the first two steps of the above guide, and selecting “Manage -> Delete”.

     

    Having issues?

    Accented characters aren’t being displayed correctly

    One of possible, though uncommon, issues may be that the website shows incorrect characters in place of accented characters (broken diacritics). Sometimes the only thing that’s necessary is manually specifying the encoding when the app connects to the database. For example:

     
    $connection = new PDO("mysql:host=mysql57.websupport.sk;port=3311;dbname=db_name; charset=utf8", "db_name", "password", array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'"));
    $connection = 'mysql:unix_socket=/tmp/mysql57.sock;dbname='nazov_db';charset=utf8';
     

    If none of these work, you may try issuing the SET NAMES command manually by adding the following after the connection string:

    mysql_query("SET NAMES 'utf8'");
    $db = mysql_pconnect('localhost:/tmp/mysql57.sock','nazov_db','heslo');
    
    mysql_query("SET NAMES 'utf8'");
    
    mysql_select_db('nazov_db');