LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Export a MySQL database including all stored procedures (https://www.linuxquestions.org/questions/linux-newbie-8/export-a-mysql-database-including-all-stored-procedures-4175606030/)

taru.tarak 05-16-2017 01:54 AM

Export a MySQL database including all stored procedures
 
Hello,

How do I export a MySQL database including all stored procedures via phpMyAdmin? I have no command line access and I am using the phpMyAdmin version 4.0.10.18.

Thanks,

AwesomeMachine 05-16-2017 02:07 AM

Is there some reason why you're asking here instead of phpmyadmin.net?

taru.tarak 05-16-2017 02:16 AM

Sorry for that... I thought someone will help.

astrogeek 05-16-2017 02:42 AM

I do not often use PHPMyAdmin, but have access to a few remote sites where it is available. I just logged into one to look at what it offers.

This one is version 4.3.8, but I have not seen many big changes in it since they broke the old good interface years ago. ;)

Choose Export from the top option tabs, then choose Custom for Export Method. The simply check the desired little boxesuntil you get to the bottom. Along the way you will see options to include stored procedures, triggers and just about any other MySQL table and data option you can think of. Here is a text copy of the form options under Object creation options:

Code:

Object creation options

    Add statements:
        Add DROP TABLE / TRIGGER statement
        Add CREATE TABLE statement
        Add CREATE VIEW statement
        Add CREATE PROCEDURE / FUNCTION / EVENT statement
        Add CREATE TRIGGER statement
        CREATE TABLE options:
            IF NOT EXISTS
            AUTO_INCREMENT


r3sistance 05-16-2017 06:58 AM

personally dislike phpmyadmin, since it is often insecure unless set-up meticulously.

Anyways doing it with mysqldump on the CLI is generally easily enough, if you are using innodb/xtradb (which I highly recommend), then you can dump everything to a .sql file with the system online and avoid locking. Something along the lines of:

mysqldump -A --events --routines --singletransaction >> /some/sql.file

taru.tarak 05-16-2017 08:47 AM

Thank you very much everyone.

Doug G 05-16-2017 04:18 PM

Haven't tried, but here's an answer that looks reasonable: http://stackoverflow.com/questions/2...rom-phpmyadmin


All times are GMT -5. The time now is 02:16 AM.