neo neo - 3 months ago 9
MySQL Question

Uploading large files to Mariadb from cmd

I'm using XAAMP and the information about database is as follows

enter image description here

I was trying to upload employees sample database from https://launchpad.net/test-db/ through CMD but I don't have much knowledge about mariaDB commands and all the information's on google is for mysql.

My command line for C:\xampp\mysql\bin\mysql.exe opens as below not as normal mysql.

Notice the

MariaDB[<none>]>


enter image description here

I have set a custom password for the database in phpmyadmin for root.

What is the command line to upload the large mysql database from the folder
C:\xampp\mysql\employees_db

Answer

Actually that is very easy:

First, you need to unzip the database in C:\xampp\mysql\bin\ folder

Then, you have all the *.sql files in that folder, right?

Now, open a command line and type the following commands:

cd C:\xampp\mysql\bin\
mysql.exe -u root -p yourDatabasePassword < employees.sql