First you mention PHPMyAdmin and then languages.
To import / export data from an existing database in MySQL I recommend the MySQL Workbench to use it quite often, for databases between 300 ~ 500mb and gives excellent results in regarding speed and monitoring of the operation.
The above method is used when the import / export does not require any adaptation , ie the structures of the tables and the content of the records remains intact.
If you need to make an import modifying structures of tables or records, in my personal experience I always did it through native PHP.
Now if the question is focused on developing an application with an already existing database , someone contradicts me but most languages should be equal to optimal the difference in speed of the queries and others will be given by the correct organization of the tables, their relationships, their processing, the hardware, but it is not that there is a better or worse language to deal with databases.
Greetings.
-EDIT -
The operation of the Workbench is quite intuitive, although I do attach some captures.
In the Data Export and Data Import / Restore section, the databases hosted in this case appear in localhost and the possibility
I also attach an example of how to perform a custom migration through PHP , in this case from SQL Server - > MySQL and making changes in the records.
<?php
//Creo un vector de provincias.
$provincias = array();
//PARAMETROS DE LA BASE DE DATOS.
$serverName = "direccion"; // Direccion de la base de datos.
$connectionInfo = array( "Database"=>"base_datos", "UID"=>"usuario", "PWD"=>"password", "ReturnDatesAsStrings" => true);
//CONEXION A LA BASE DE DATOS Y DETECCION DE ERRORES EN LA CONEXION.
$conn = sqlsrv_connect($serverName, $connectionInfo); //Ejecuto la conexión a la base de datos.
if($conn) // Si la conexión fue exitosa.
echo "Conexión con SQL Server establecida.<br />";
else //Si hubo errores, informo el tipo de error y termino la ejecución.
{
echo "Conexión no se pudo establecer.<br />";
die( print_r( sqlsrv_errors(), true));
}
//PRIMERO OBTENGO LA CANTIDAD DE REGISTROS DE LA TABLA
$sql = "SELECT * FROM Ms_Provincias
WHERE idProvincia NOT IN(25,26,27,29,30,33,36,37,38,39)";
$stmt = sqlsrv_query($conn, $sql); // Ejecuto la consulta.
if($stmt === false) // Si la consulta tuvo un error.
die( print_r( sqlsrv_errors(), true));
$numFields = sqlsrv_num_fields($stmt); // Numero de registros.
while(sqlsrv_fetch($stmt)) { //Recorro los registros.
for($i = 0; $i < $numFields; $i++) { //Recorro las columnas del registro.
if($i==0)
$provincia['id'] = sqlsrv_get_field($stmt, $i);
else if($i==1)
$provincia['nombre'] = sanear_string(sqlsrv_get_field($stmt, $i)); // Acentos son saneados.
else if($i==2)
$provincia['pais_id'] = sqlsrv_get_field($stmt, $i);
else if($i==3)
{
else if(sqlsrv_get_field($stmt, $i) == 0)
$provincia['estado'] = 1;
else if(sqlsrv_get_field($stmt, $i) == 1)
$provincia['estado'] = 0;
}
$provincia['campo_particular'] = intval("1");
}
array_push($provincias, $provincia); //Agrego el elemento anterior al array.
}
echo count($provincias); //Esto es para comprobar el array esta lleno de registros.
sqlsrv_close($conn); //Cierro la conexión.
//TRATAMIENTO DE DATOS.
for($i=0;$i<count($provincias);$i++)
{
for($j=0;$j<count($provincias);$j++)
{
if(strtoupper($provincias[$i]['nombre']) == strtoupper($provincias[$j]['nombre']) && ($i!=$j)) // Nombres son saneados.
{
unset($provincias[$j]); // Elimino el elemento que cumple la condicion de duplicado.
$provincias = array_values($provincias); //Arreglo los indices del array, no confundir con el ID de provincia.
}
}
echo "<br>";
echo $provincias[$i]['nombre'];
}
echo "<br>";
echo count($provincias); //Esto es para comprobar el array esta lleno de registros.
//UNA VEZ QUE TENGO LOS DATOS DE LA BASE VIEJA, VOY A LA BASE NUEVA Y LOS GUARDO.
$conn = new mysqli("localhost", "root", "", 'basededatos');
if(!$conn)
die("Conexion con MySQL invalida: " . mysqli_connect_error());
else
echo "Conexion con MySQL correcta";
if(is_array($provincias)){
$sql = "INSERT INTO provincias (id, nombre, pais_id, campo_particular, estado) values "; // Genero la estructura de la consulta.
$valuesArr = array(); //Vector auxiliar.
foreach($provincias as $row){ //Recorro el vector principal.
$id = (int)($row['id']);
$nombre = $row['nombre'];
$pais_id = $row['pais_id'];
$campo_particular = (int)($row['campo_particular']);
$estado = (int) $row['estado'];
$valuesArr[] = "('$id', '$nombre', '$pais_id', '$campo_particular', '$estado')";
}
$sql .= implode(',', $valuesArr);
mysqli_query($conn, $sql) or exit(mysqli_error($conn)); //Ejecuto la consulta.
}
?>