Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the export of MySQL stored procedures?

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about the export of MySQL stored procedures. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

MySQL table structure data already exist in the target database. MySQL stored procedures can be exported and imported by mysqldump tools. Currently, you only want to export stored procedures, not data and structures. The specific usage is as follows:

For example:

Mysqldump-uroot-pendant root'-h test.com.cn-P 3306-n-d-t-R test > procedure.sql

Parameter description:

-n:-- no-create-db

-d:-- no-data

-t:-- no-create-info

-R:-- routines Dump stored routines (functions and procedures)

Introduction to the main parameters of mysqldump:

1. Connection option

-uthmum, Murphy, username,

-pmam Musi passwordroomname

-hmm. color, color, etc.

-PMAE, music, and portals #

two。 Output content options

-- add-drop-database

-- add-drop-table

-ntra, muri, no, create, db.

-ditto, murmur, Murphy, data

-t / t / m / w / w / b / w / w / w

3. Output format option

-- compact

-c-- complete-insert

-T (specify that the data in the data table is backed up as two files: simple data file and table SQL)

Note: xx.sql table creation files are created by linux root users, while xx.txt files are created by linux mysql users, so the storage path of these two files must ensure that mysql users have the permission to read, write and create files.

-- fields-terminated-by=name (domain delimiter)

-- fields-enclosed-by=name (domain reference)

-- fields-optionally-enclosed-by=name (optional characters for domain references)

-- fields-escaped-by=name (escape character)

4. Character set option

-- default--character-set=xx

5. Other options

This is what the export of the MySQL stored procedure shared by the editor is like. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report