Home > Database > Mysql Tutorial > mysqldump 导出数据和存储过程

mysqldump 导出数据和存储过程

WBOY
Release: 2016-06-07 17:17:02
Original
1091 people have browsed it

今天使用mysqldump导出数据库,导入到新库的时候,发现没有存储过程。默认居然不是完整的

今天使用mysqldump导出数据库,,导入到新库的时候,发现没有存储过程。

默认居然不是完整的啊。

加上“-R”,就好了。

-R, --routines      Dump stored routines (functions and procedures).

现在用:

mysqldump -uroot -ppassword -R dbname> dbname.sql

导入更方便:

mysql -uroot -ppassword dbname

记得导入之前先建库。

CREATE DATABASE dbname DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template