1、mysql导出数据库及表
导出数据库:
mysql -uusername -ppassword databasename (tablename)> filename.sql
2、mysql导入数据库
创建用户:
grant all privileges on *.* to 'username'@'localhost' identified by 'username' with grant option;
创建数据库:
create database databasename;
创建数据表:
create table tablename.....
导入数据库:
mysql -uusername -ppassword databasename (tablename)< filename.sql