首页 > > > linux 批量重命名文件
Type the following command to import sql data file:
$ mysql -u username -p -h localhost>< data.sqlIn this example, import 'data.sql' file into 'blog' database using Sathish as username:
$ mysql -u sat -p -h localhost blog < data.sqlIf you have a dedicated database server, replace localhost hostname with with actual server name or IP address as follows:
$ mysql -u username -p -h 202.54.1.10 databasename < data.sqlOR use hostname such as mysql.cyberciti.biz
$ mysql -u username -p -h mysql.cyberciti.biz database-name < data.sqlIf you do not know the database name or database name is included in sql dump you can try out something as follows:
$ mysql -u username -p -h 202.54.1.10 < data.sqlRefer: http://dev.mysql.com/doc/refman/5.6/en/mysqldump.html
If you want a GUI tool then you could probably use SQLyog
参考文献:
http://stackoverflow.com/questions/11407349/mysql-how-to-export-and-import-an-sql-file-from-command-line
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2730/viewspace-3169756/ ,如需转载,请注明出处,否则将追究法律责任。