Note: SQLAdmin is typically a web-based database management tool (e.g., for MySQL/MariaDB). The following steps focus on using command-line tools (like mysqldump) for data import/export—common methods in Ubuntu environments. If you specifically need SQLAdmin web interface steps, refer to tool-specific documentation.
mysqldump (for MySQL/MariaDB) is installed. For MySQL:sudo apt update && sudo apt install mysql-client
For MariaDB:sudo apt install mariadb-client
sudo mysqldump --all-databases > /backup/mysql/all_databases.sql
For a specific database (e.g., mydb):mysqldump -u username -p mydb > mydb_backup.sql
Use mysqldump to create a SQL file with the database structure and data:
mysqldump -u username -p database_name > backup_file.sql
username with your database user, database_name with the target database, and backup_file.sql with your desired filename.To export only certain tables (e.g., table1, table2):
mysqldump -u username -p database_name table1 table2 > tables_backup.sql
Add the --no-data flag to export only the database schema:
mysqldump -u username -p --no-data database_name > structure_backup.sql
If migrating to PostgreSQL, use pg_dump (PostgreSQL’s equivalent) or convert the MySQL dump file manually. For SQLite, use:
sqlite3 source.db .dump > dump.sql
mysql -u username -p
USE database_name;
SOURCE /path/to/backup_file.sql;
Replace /path/to/backup_file.sql with the actual file path.mysql -u username -p -e "CREATE DATABASE new_database;"
mysql -u username -p new_database < /path/to/backup_file.sql
Skip the MySQL login step by piping the SQL file directly:
mysql -u username -p database_name < /path/to/backup_file.sql
mysql -u username -p -e "SHOW DATABASES;"
SELECT * FROM table_name LIMIT 10;) to confirm data integrity.EXPORT, IMPORT) for the operations.pv (pipe viewer) to monitor progress:pv backup_file.sql | mysql -u username -p database_name