Get the App
SLTechnology News&Howtos  ›  Database  › 

What is the export of MySQL stored procedures?

Shulou Source: shulou.com Published: 2022-05-31 14:11:47 11月13日 Update

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.

Tags: Data file procedure storage content character user two parameter structure analysis output professional small and medium rich content delimiter backup character set namely tool Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno vpn MySQL Huawei Microsoft