Below are the different ways to import database sql file using mysql command.
Use the following command to import database using command line in MySQL :
C:\xampp-7\mysql\bin> mysql -u username -p password databaseName < location of the file where it is located.
** location of the file can be C:\testfolder\test.sql .
Another way is :
first login to the mysql window screen and see the below screen.
mysql > Use databasename; mysql> source C:\testfolder\test.sql(location of the file you want to import);
As you press enter key, you will see processing like below. and it will import database successfully.
Use the following way :
mysql> use databasename; Database changed. mysql> source /var/www/html/xyz.sql; //path to your database file Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec)
After successful completion use below command to see list of tables.
mysql> show tables;
Please let me know if you face any issues.
App usage is growing steadily without showing any signs of slowing down. Hence, it is no surprise that mobile applications…
As the world has grown more digital, businesses have adapted themselves. An effectual adaptation includes online advertising. Offline advertising styles…
Step into a world where apps dance to the user's tune. Picture Instagram, a photo-sharing sensation that swept the globe.…
COVID-19 has led to a digitalization of lifestyle. As patients are taking their mental and physical health more seriously, healthcare…
Introduction WordPress, an immensely popular content management system (CMS), powers over 40% of the internet. What makes WordPress even more…
For moving companies trying to capture their market share amidst stiff competition, a tip or two about what they can…