-1

Problem when importing database UTF-8 encoded file table Arabic language change within the table How can I import the table encodes UTF-8 This is the current code I want to modify it

    $sqlFile = 'sql/plugins.sql';
    $queries = file_get_contents($sqlFile);
    $queries = explode(';', $queries);

    foreach ($queries as $query) {
        mysql_query($query);
    }
  • 5
    Possible duplicate of [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – Qirel Jun 10 '16 at 00:01

1 Answers1

0

You don't need PHP. (And, when using PHP, do not use the deprecated mysql_* interface.)

Probably all you need is the commandline tool:

mysql < sql/plugins.sql
Rick James
  • 135,179
  • 13
  • 127
  • 222