F
F
fr0zen2014-10-18 02:56:51
MySQL
fr0zen, 2014-10-18 02:56:51

How to convert data from myisam to innodb?

There are 2 databases on different servers. One database uses myisam, the other uses innodb. When transferring any record from one database to another, all Cyrillic characters turn into the "?" character. How can I organize the correct transfer of Cyrillic data using php.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alternativshik, 2014-10-18
@alternativshik

And where does the table engine to the encoding? You have jambs with encodings there.

S
Sergey Petrikov, 2014-10-18
@RicoX

You somehow crookedly overtake, while the encoding is spoiled, try this:

<?php
$host = 'localhost';
$log = 'login';
$pass = 'PASSWORD';
$db = 'DBNAME';

mysql_connect($host,$log,$pass);
mysql_select_db($db);
$q = mysql_query("SHOW TABLES");
while ($table = mysql_fetch_array($q))
{
        mysql_query("ALTER TABLE `".$table['Tables_in_'.$db]."` ENGINE = InnoDB");
}
?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question