1. Create an empty database in phpMyadmin. Main thing to do is give it the same name as the sql file you are trying to upload. One can also use command CREATE DATABASE databasename;
2. Log on into shell: mysql -u root -p. It will then ask you for your root password. Type it in
3. Let Mysql know which file you intend to use
mysql> USE file.sql;. (If you fail to use the USE command you can end up with this error: “error 1046 (3D0000): no database selected. If your database is large this error can freeze the screen)
4. Dump the sql data file with this code: SOURCE /home/username/foldername/file.sql.
AND U R DONE.
2. Log on into shell: mysql -u root -p. It will then ask you for your root password. Type it in
3. Let Mysql know which file you intend to use
mysql> USE file.sql;. (If you fail to use the USE command you can end up with this error: “error 1046 (3D0000): no database selected. If your database is large this error can freeze the screen)
4. Dump the sql data file with this code: SOURCE /home/username/foldername/file.sql.
AND U R DONE.
Comments