03-12-2019, 12:04 PM
(03-12-2019, 08:31 AM)Rehan Wrote: for now i want to import database from my Windows system to ubuntu server via terminal is it possible?
That is certainly possible.
1. Backup the database on your Windows server into the .sql format (you can also compress it if you like).
2. Transfer the .sql file to your Linux server (extract it if you compressed it).
3. Start the MySQL command line and login as root:
Code: (Select All)
mysql -u root -p
4. Create a empty database where you want to import the backup into:
Code: (Select All)
CREATE DATABASE databasenamehere;
5. Exit the MySQL command line with a simple "exit" command.
6. Import the database backup into the new empty database:
Code: (Select All)
mysql -u root -p databasenamehere < databasebackupfile.sql
7. Wait until the import is complete.
That's it actually. Works on MySQL and MariaDB.