1

I am trying to import a sample database "employees.sql" from official phpMyAdmin webpage. I am using uwamp server and getting the following error when using phpMyAdmin "import" option:

Unrecognized statement type. (near "source" at position 0)

.SQL FILE AT LINE WHERE ERROR IS REPORTED:

SELECT 'LOADING departments' as 'INFO';
source load_departments.dump ;

I am not sure what to change to successfully import the database. I also tried different things like putting load_departments.dump in quotes, but it still didn't work. Screenshot of error.

Luki
  • 409
  • 11
  • 25

3 Answers3

0

I suggest you to create an empty database and import that sql file inside of it. Check it out..

Janen R
  • 729
  • 10
  • 21
  • I actually tried this. I created a new database and under import I tried to import the .sql file. – Luki Mar 04 '17 at 17:52
  • I hope you will get from here -> https://www.phpmyadmin.net/files/4.5.5/ – Janen R Mar 04 '17 at 17:55
  • I am not sure what you mean... Apparently phpMyAdmin got installed along with my uwamp server and I got the sample database from this page yes, the official phpmyadmin page. – Luki Mar 04 '17 at 18:00
0

How do you use MySQL's source command to import large files in windows

must read and you will definitely get many ideas! I think you should fire source command from cmd (command prompt)

Community
  • 1
  • 1
pd1
  • 36
  • 7
0

Assumption: MySQL Server was installed and you have downloaded the employees database from github. Unzip the package and go to the directory from command prompt.

  1. Enter the following command and on prompt, provide the sql password.

mysql -u root -p -t < employees.sql
  1. Verify your installation by entering the following command.

 mysql -u root -p -t < test_employees_md5.sql
Veeramani Natarajan
  • 192
  • 2
  • 4
  • 11