GithubHelp home page GithubHelp logo

umairfarooq21 / mysql-database-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/mysql-database-samples

0.0 0.0 0.0 165 KB

View sample databases to build applications with MySQL

License: MIT License

mysql-database-samples's Introduction

Sample Databases for Azure Database for MySQL flexible server

There are two sample database options for you to use:

You can use the runtime of your choice (Python, PHP, .NET , Node JS etc) to build using these samples. Note that this repository only contains sample databases schema with some data. It does not contain any application code.

Getting Started

Follow the steps below to install these scripts out on your server.

Prerequisites

  • You need an Azure subscription. Sign up for Free trial and you can get 12 months free with Azure Database for MySQL Flexilbe server.
  • You need to install a client to install the schema and data. You can install Azure CLI or MySQL Client tool like mysql.exe or MYSQL Workbench.

Installation using Azure CLI

  1. Install Azure CLI . If ou have Azure CLI installed , please run az upgrade to make sure you are suing the latest Azure CLI version.
  2. Create Azure database for MySQL Flexible server with public access az mysql flexible-server create --name mydemoserver --pubic-access all
  3. Import data using execute command. az mysql flexible-server execute -n mysqlservername -u adminuser -p "adminpassword" -f "path to pollsdb.sql"

Installation using mysql.exe

Install MySQL command line client tool and then run the following command. Make sure to replace the server name , username and database name with the correct values . SSL is enforced by default hence --ssl-mode is required. You also need to download the public SSL certificate.

Connect with SSL

mysql -h mysqlservername.database.azurecom -u adminusername -p database_name --ssl-mode=REQUIRED --ssl-ca=DigiCertGlobalRootCA.crt.pem < pollsdb.sql

Connect without SSL

SSL can be turned off for the server. See how to disable SSL.

mysql -h mysqlservername.database.azurecom -u adminusername -p database_name < pollsdb.sql

Installtion using MySQL Workbench

Checkout this tutorial on how to connect with MySQL Workbench. You can copy and paste the script in the query window and execute it.

Resources

Azure Database for MySQL Flexible Server Documentation

mysql-database-samples's People

Contributors

mksuni avatar microsoftopensource avatar microsoft-github-operations[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.