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.