How to dump my Mysql in-app database?

Jean Carlos de Almeida 21 Reputation points
2020-05-06T14:45:53.107+00:00

I was reading some instructions about Mysql In-app on https://github.com/projectkudu/kudu/wiki/MySQL-in-app

And as discribed there, I configured my public credentials for my SCM and I execute a POST to myapp.scm.azurewebsites.net/mysqlutils/dump
The response was 200, but I don't know how I can get the dump file.

What I need to do to get my dump file?

The response body when I POST to dump:

-- MySQL dump 10.13  Distrib 5.7.9, for Win32 (AMD64)
--
-- Host: 127.0.0.1    Database: localdb
-- ------------------------------------------------------
-- Server version 5.7.9

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2020-05-06 14:32:04
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,913 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,636 Reputation points Microsoft Employee
    2020-05-07T18:52:16.033+00:00

    Hi @JeanCarlosdeAlmeida-3435,

    I can confirm that's the correct way to do it. I created a wordpress site to host in Azure and POST'ed to /mysqlutils/dump. For my response, I received the scripts and SQL commands to create the data (see snippet below).

    /*!40103 SET TIME_ZONE='+00:00' */;  
    /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;  
    /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;  
    /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;  
    /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;  
      
    --  
    -- Table structure for table `wp_commentmeta`  
    --  
      
    DROP TABLE IF EXISTS `wp_commentmeta`;  
    /*!40101 SET @saved_cs_client     = @@character_set_client */;  
    /*!40101 SET character_set_client = utf8 */;  
    CREATE TABLE `wp_commentmeta` (  
      `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,  
      `comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',  
      `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,  
      `meta_value` longtext COLLATE utf8mb4_unicode_520_ci,  
      PRIMARY KEY (`meta_id`),  
      KEY `comment_id` (`comment_id`),  
      KEY `meta_key` (`meta_key`(191))  
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;  
    /*!40101 SET character_set_client = @saved_cs_client */;  
      
    --  
    -- Dumping data for table `wp_commentmeta`  
    --  
    

    I would verify you have your database files in D:\home\data\mysql.

    7982-2020-05-07-14-25-48-diagnostic-console-microsoft-e.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.