During daily development, import and export operations of the database cannot be avoided.
mysqldump -u root -p abc >abc.sql
Then press Enter to enter the password;
mysqldump -u database link username -p Target database> The stored file name
The file will be exported to the current directory
mysql -u username-p database name mysql - u abc -p abc
Note that the sql file must be in the current directory. If it is not in the current directory, it needs to be in
The above is the detailed content of How to use mysql command to import and export sql files under Linux. For more information, please follow other related articles on the PHP Chinese website!