#1. Open the XAMPP Control Panel
Where:
- username – your MySQL username. e.g. root
- database_name – database name you are importing to
- /path/file.sql – full path to your .sql file
when you haven’t created a MySQL username. In that case, you need to type “root” for the username.
example: mysql -u root -p the_code_developer< "htdocs/drupal8/tasalliresort/APP-DATA.sql"
Note: On the below screen command, you will define own define own database name. The database name will be the one that you created in the phpMyAdmin and would like to import to SQL file. In our case, we have database name “tasalli”.
here the database phpmyadmin
here the database phpmyadmin
Import the database in MAMP using command: goto the bin folder and run that which is shar in below:
ReplyDeletestep 1: given make the data base like ex "undp17"
Step 2: given the path.
lakhan.thakur@FVFZM46XL410 bin % mysql -u root -p undp17 > /Users/lakhan.thakur/Downloads/17-02-22.sql
Enter password: root
lakhan.thakur@FVFZM46XL410 bin % mysql -u root -p undpme < /Users/lakhan.thakur/Desktop/backupme.sql
DeleteEnter password:
lakhan.thakur@FVFZM46XL410 bin % mysql -u root -p undpme < /Users/lakhan.thakur/Desktop/backupme.sql
ReplyDeleteEnter password:
mysql> create new_database;
ReplyDeletemysql> use new_database;
mysql> source (Here you need to import the path of the SQL file);
E.g.:
mysql> source E:/test/dump.sql;
c:\xampp\mysql\bin
ReplyDelete# mysql -u root -p
MariaDB [(none)]> show databases;
MariaDB [(none)]> create database DBname;
MariaDB [(none)]> use DBname; Database changed
MariaDB [mydata]> show tables; Empty set (0.001 sec)
MariaDB [mydata]> select * from tablename;
MariaDB [mydata]> source E:/test/dump.sql;