paint-brush
Installing Mysql on Ubuntu linuxby@xameeramir
360 reads
360 reads

Installing Mysql on Ubuntu linux

by Zameer AnsariDecember 25th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

<a href="http://www.microsoft.com/sqlserver/" target="_blank">SQL server</a> is considered the best database for&nbsp;<a href="https://www.microsoft.com/net" target="_blank">.NET</a> on <a href="https://www.microsoft.com/en-in/windows" target="_blank">Windows</a>. In my <em>personal</em> <a href="https://hackernoon.com/tagged/opinion" target="_blank">opinion</a>, the analogy with <a href="http://www.mono-project.com/" target="_blank">Mono</a> is <a href="https://www.mysql.com/" target="_blank">MySql</a>.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Installing Mysql on Ubuntu linux
Zameer Ansari HackerNoon profile picture

SQL server is considered the best database for .NET on Windows. In my personal opinion, the analogy with Mono is MySql.

In this post, we’ll see how to setup it and it’s connector on Ubuntu.

I was trying to do some Mysql, to support a project which need it and can run on .NET on Ubuntu linux. In an effort to get everything out of Windows.

During the process, the software center had some fever:

Initially, I tried individual installations of Workbench and Mysql from APT. However, since I was not 100% sure (and the above eclipse), I just purged everything and followed the sure way.

Installed mysql server using command sudo apt-get install mysql-server

Gave password (and forgot):

Set up terminal client using sudo apt-get install mysql-client, which can be accesed as root by using command mysql -u root -p

And/Or from UI using sudo apt-get install mysql-workbench

Setting up Mysql connector

Go here to download the connector. Select .NET & Mono platform and initiate download process.

Extract the downloaded file and move it to your directory of preference.

An inside view of the directory will look like this:

cd to the directory and ensure that MySql.Data.dll indeed exists by using ls command. I went to v4.5 to make sure that I have all the new patches.

Use command sudo gacutil /i MySql.Data.dll to register it to Global Assembly Cache (GAC)

To confirm registration:

  • Go to directory /usr/lib/mono/gac by using command cd /usr/lib/mono/gac
  • List it’s contents by using command ls

You will find MySql.Data if the registration has been successful.

I tried following official installation instruction but didn’t found it perfect, the above steps were tried on 64bit Ubuntu 14.6.

Photos

Originally published at xameeramir.github.io.