首页 » 资源分享 » Linux » 正文

Linux使用source命令还原备份mysql数据库



Linux中倒入mysql数据库的方法:

1、先进入mysql
[root@localhost ~]# mysql -uroot -p
Enter password:
mysql>

2、选择数据库(如test)
mysql> use test;

3、全路径导入(如数据库在/data/wwwroot/test.sql)
mysql> source /data/wwwroot/test.sql;

完成!