Wednesday, August 19, 2015

Work with MySQL database on Azure

Hi,

I have published two videos on channel 9 about Microsoft Azure capabilities on mySQL databases.
You can create MySQL databases for free on Azure, start your proof of concept and any development project by having MySQL instance that can scale based on the power of cloud computing.

I covered how to provision, create, manage MySQL databases on Azure and how to connect to these instances from MySQL workbench.


In the first video, Get Started with MySQL on Azure i covered how to provision, create and manage mySQL instance on Azure.

Video Url: https://channel9.msdn.com/Blogs/MostafaElzoghbi/Get-Started-with-MySql-on-Azure



In the second video, Get Started with MySQL workbench for MySQL databases on Azure i covered how to connect and manage MySQL azure instances from your favorite MySQL management studio "MySQL workbench".

Video Url: https://channel9.msdn.com/Blogs/MostafaElzoghbi/Get-Started-with-MySQL-Workbench-for-MySQL-databases-on-Azure



Hope you enjoy both of these videos.

If you need any in deep learning materials to be posted on ch9, please drop me a message.

Monday, August 17, 2015

mysql is not recognized as an internal or external command

Hi,

I am using Visual Studio 2015 for developing cordova apps. I have installed MySql tools yesterday and since then eveytime i build or deploy my app, i get this error:

mysql is not recognized as an internal or external command


Even though i don't use MySQL in my cordova app but still i am not able to build or deploy any cordova app in Visual Studio 2015.

The meaning of this error message is: The system couldn't locate the mysql.exe in your system.

I am running Windows 10, here is the steps to fix that:

1) From the Cortana search, open up the control panel.
2) Navigate to System & Security, and then System.
3) Click on Advanced System Settings from the left pane.
4) Click on Environment variables.
5) Try to find Path system variable and click on Edit.

Copy the variable value in any editor and do the following:

a) Enclose any mySQL component path between double quotation "".
b) Add the mySQL.exe path at the end of the variable. You need to look for the installation path for MySQL installation and grab the installation folder which contains MySQL.exe and add it to the Path system variable.
In My Case the path for MySQL.exe is:
C:\Program Files\MySQL\MySQL Server 5.6\bin


Below is the Path system variable after the update: [[ notice the highlighted yellow section is what i have updated ]].

C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;"C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\";"C:\Program Files (x86)\MySQL\MySQL Fabric 1.5 & MySQL Utilities 1.5\Doctrine extensions for PHP\";"C:\Program Files\MySQL\MySQL Server 5.6\bin"


6) Click on Ok to save your changes.
7) Close and re-open VS 2015 (THIS IS A MUST)
8) Try to build or deploy your cordova app! it starts working again...

Enjoy.


Friday, August 07, 2015

How to setup Ubuntu server VM on Azure


Hi,

I was trying to provision an Ubuntu server VM on Azure and i'd like to share how to get up and running Ubuntu sever 12/14/15 VM on Azure step by step.

1) From Azure Portal,  Select Virtual Machines under compute, then select Ubuntu Server 15.



2) Install PuTTy as SSH Client to install extra components for the provisioned VM, you can find the client installation here:



3) Open PuTTY client and enter the Ubuntu server server VM url, you can find it in Azure portal -- Under Dashboard page for the provisioned VM. For example:  UbuntuDevSample101.cloudapp.net

  1. Click on connect, a PuTTY console window will pop up.
  2. Log in with the creds you have set while provisioning your Ubuntu VM.
  3. After a successful login, A SSH command window open.

 4) We need to install Ubuntu Desktop, run the following command:

$ sudo apt-get install ubuntu-desktop


This command will take a while, once it is completed, this means we have an Ubuntu desktop installed on the server.

Below screen show shows the command in SSH client:



 5) Install remote connection (RDP) capability by typing the following command:

$ sudo apt-get install xrdp


6) From Azure Portal, select the provisioned VM and select End Points tab.
7) We need to add a RDP end point to connect to the VM,
8) To add RDP endpoint to the VM, check out below screen shot:



9) From Azure portal, Click on Connect after adding the end point.
10) Enter the username and password!
11) After a successful login, you will be able to RDP to ubuntu VM with a desktop component!


Enjoy! Hope this helps.

Tuesday, July 28, 2015

Get started with Azure Machine learning for free

If you would like to start building Azure machine learning experiments on Micosoft Azure, You will be able to start getting started with Microsoft free offer for Azure feature-sepcific offer where you can work on Azure ML without a need for Azure subscriptions.

All what you need is a Microsoft account to login, once you got that, visit below link to start experimenting Azure ML.

If you don't have a Microsoft account (Live, Hotmail, Outlook), here you can sign up for free:

Update: Due to a recent update in Azure ML site,You will be able to use Azure Studio as a guest and you don't need to login or create a Microsoft account.
We recommend you to create a Microsoft account to store all your experiments under you account to be available everywhere.


Enjoy Azure ML!

Thursday, July 16, 2015

Getting Started with Cross Platform Mobile Development using Cordova



Getting started with cross platform mobile apps using cordova from Mostafa Elzoghbi

Sample Demos:
https://github.com/Microsoft/cordova-samples

Yesterday, I had the opportunity to present a session about cross platform mobile development using Cordova at Microsoft Reston.

This blog post is to share my presentation and my sample demos to everyone!

Hope this helps.




Tuesday, July 14, 2015

Free Microsoft eBooks

Hi All,

I'd like to share with all my blog readers and followers the largest collection of free ebooks from Microsoft.

Great resources in Microsoft Azure, Machine Learning, Azure Web Apps, Microsoft SharePoint, Dynamics CRM, Office 365, Cloud Apps, SQL Azure, SQL Server, and much more.

Refresh your skills set and download as much as you can:

http://blogs.msdn.com/b/mssmallbiz/archive/2015/07/07/i-m-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-windows-8-1-windows-8-windows-7-office-2013-office-365-sharepoint-2013-dynamics-crm-powershell-exchange-server-lync-2013-system-center-azure-clo.aspx

Enjoy!

Wednesday, July 08, 2015

How to configure Cordova App to use AngularJS

Hi,

In this blog post i am showing how to Add AngularJS library to an existing Cordova App in Visual Studio 2015. The post shows some tips on organizing your JS files into Crodova App project template.

Since i didn't find an example on how to incorporate AngularJS library in Cordova App with out the need to collect various JS files and place them in proper folder structure that works with Cordova App project template. This blog will guide in a step by step how to incorporate AngularJS in Crodova App using VS 2015.

What are we doing ?
Since the AngularJS framework helps developers to follow MVC pattern. We will be creating an out-of-the box Cordova application, then we will add a controller js file and then will set a value in the controller and bind in view page.

Follow below steps to have a running Corodva App with AngularJS installed and configured!

1) Create a Crodova project in VS2015.


2) From Solution explorer window, Click on Manage NuGet Packages.
3) Search for AngularJS and add AngularJS.Core to your project.


4) All AngularJS files will be added under Scripts folder.


5) Select All AngularJS files and move it under scripts folder under www folder.



This is a best practice to include all Cordova App JS files under scripts folder, Since VS 2015 adds JS libraries under Scripts folder as a standard location, we need to move it under scripts folder under www folder.

6) Create a controllers folder  and then add MainCtrl.js file as your controller.
7) Open index.html and add a reference to angular.js and MainCtrl.js.

  <!-- AngularJs -->
    <script src="scripts/angular.min.js"></script>

    <!-- Controllers -->
    <script src="controllers/MainCtrl.js"></script>

8) Add the following code snipped in MainCtrl.js controller , which sets a value for myname in the scope.


(function () {

    angular.module('myApp', [])
    .config([function () {
        // configuration
    }])
    .run([function () {
        // Running
    }])
    .controller('MainCtrl', ['$scope', function ($scope) {
        $scope.myname = "Mostafa Elzoghbi Demo!";

    }])

})();

9) Open up index.html and retrieve (bind) myname value from the controller; set the angularjs app name and the controller name.

<body ng-app="myApp" ng-controller="MainCtrl">
    <p>Hello, your application is ready!</p>
    <p>{{myname}}</p>

10) Run your project! and you will see that myname binding value from the controller.



The full demo can be downloaded from this link:

https://drive.google.com/file/d/0B3qz_TH6n68UTk5RT1A4QmU1S3c/view?usp=sharing