mysqldump — A Database Backup Program for MySQL


There are three general ways to invoke mysqldump:

shell> mysqldump [options] db_name [tables]

shell> mysqldump [options] --databases db_name1 [db_name2 db_name3...]

shell> mysqldump [options] --all-databases

In its simplest form, the mysqldump utility can be used like this:

mysqldump –-user [user name] –-password=[password] [database name] > [dump file]

this will include both the schema and data as well.

If you need only the schema use the -d or --no-data option

e.g. mysqldump -d -u root -pp@ssword mydatabase > mydatabase.sql

Reference: MySQL :: MySQL 5.0 Reference Manual :: 4.5.4 mysqldump — A Database Backup Program


How do I Recompile the MySQL Library to Run Under the Medium Trust Environment in ASP.NET?

Update: You no longer need that if you use the MySQL Connector/Net 5.2 or later.

  1. Download the source code for the MySQL Connector/Net from
  2. Extract the contents of the zip file to a local directory.
  3. Open mysql.csproj project file in Visual Studio.
  4. Open the AssemblyInfo.cs file, and add the following code, in the using block, at the top of the file (if it is not already there):using System.Security;
  5. Add the following code to the assembly section of the file:[assembly: AllowPartiallyTrustedCallers]
  6. Recompile the dll.

You may now reference this dll from other projects. When you decide to publish your project to your hosting server, you need to upload this modified version of the dll to your bin directory.

Via How do I Recompile the MySQL Library to Run Under the Medium Trust Environment? – Help Center—Knowledge Base and FAQ

MySQL Tutorial from


MySQL Tutorial

3.1. Connecting to and Disconnecting from the Server

3.2. Entering Queries

3.3. Creating and Using a Database [+/-]

3.3.1. Creating and Selecting a Database

3.3.2. Creating a Table

3.3.3. Loading Data into a Table

3.3.4. Retrieving Information from a Table
3.4. Getting Information About Databases and Tables

3.5. Using mysql in Batch Mode

3.6. Examples of Common Queries [+/-]

3.6.1. The Maximum Value for a Column

3.6.2. The Row Holding the Maximum of a Certain Column

3.6.3. Maximum of Column per Group

3.6.4. The Rows Holding the Group-wise Maximum of a Certain Field

3.6.5. Using User-Defined Variables

3.6.6. Using Foreign Keys

3.6.7. Searching on Two Keys

3.6.8. Calculating Visits Per Day


11.6. Date and Time Functions

25.2.3. Connector/NET Examples and Usage Guide

25.2.4. Connector/NET Reference

25.2.5. Connector/NET Notes and Tips

25.2.6. Connector/NET Support

25.3.1. Installing the MySQL Visual Studio Plugin

25.3.2. Creating a connection to the MySQL server

25.3.3. Using the MySQL Visual Studio Plugin

25.3.4. Visual Studio Plugin Support

A. MySQL 5.0 Frequently Asked Questions

MySQL Forums

Installing MySQL on Windows


Installing MySQL Community Server on Windows