1. When using navicat for backup, click the database and then select the backup. psc file above the editing area (click the backup file right click the backup information option to find the general panel, view the file directory and take it out), or right-click to select the dump SQL file to save it as a. sql file. 2. When restoring the database (the database is open, select the database, select Backup - right-click - Restore Backup, and select the corresponding type of file.
Can you open your BAK file with Notepad and paste a paragraph
Because BAK is not a standard format. In fact, it is the name of the person who backed it up before. Look at the content, tell you what format it actually belongs to, and you can reply in that format.
1、 Export: use the mysqldump command line format mysqldump - u username - p database name database name. sql Example: mysqldump - u root - p abc abc.sql (export database abc to abc.sql file) When prompted for a password, enter the password of the database username.2、 Import: use the mysql command line command format mysql - u username - p database name 3. Direct COPY If the database is large, you can consider using the direct copy method, but different versions and operating systems may not be compatible, so you should use it carefully.3.1 Package the original database with tar to a file tar - zcvf mydb.tar.gz mydb 3.2 Create an empty database 3.3 Unzip it in a temporary directory,For example: cd/tmptar - zxvf mydb.tar.gz 3.4 Copy the unzipped database file to the relevant directory cd mydb/cp */var/lib/mysql/mydb/For FreeBSD: cp */var/db/mysql/mydb/3.5 The permission setting changes the owner of the copied file to mysql: mysql, and the permission to 660 chown mysql: mysql/var/lib/mysql/mydb/*