sql >> Base de Datos >  >> RDS >> Mysql

importar archivo sql a una base de datos usando wamp

Opción 1; PHPMyAdmin

1. left click wamp -> phpmyadmin
2. select database then click import (top right)
3. locate the database and click go.

Opción 2; Usando la línea de comando.

La forma más fácil de importar un archivo sql a una base de datos en WAMP, usando la línea de comandos, es la siguiente:

1. Open Command Prompt (CMD - DOS) get into the mysql folder, which in my case works like this
C:\> cd C:\wamp\bin\mysql\mysql5.0.51b\bin

2. Then use this command to fire up MySQL
   This line basically connects you to the mysql database of your choice.
   (-p for password if you have one)
C:\wamp\bin\mysql\mysql5.0.51b\bin> mysql.exe -use databasename -u username -p

3. To make things easier, copy the SQL file into the same folder as mysql.exe, and then run this
mysql> source myfilename.sql;