Thanks to Author:

Tutorial will show you how to set up Apache, PHP and MySQL on your Quantal Quetzal machine so you can get rolling.

Install Apache

First you install Apache, and it’s as easy as it ever was:

Go to Terminal

sudo apt-get install apache2

After a quick install it will come up automatically. Load up a browser and point it http://localhost and you should see this:

This is your bare Apache server.

Install PHP

You’ll want to install the latest version of PHP 5, to do that type:

sudo apt-get install libapache2-mod-php5 php5

This will install PHP5 plus the libraries to interface with Apache.

You’ll want to restart the server

sudo etc/init.d/apache2 restart

To test it out, create a file called test.php:

sudo nano /var/www/test.php

Let’s use the phpinfo() function so we can check out our installation:

/var/www/test.php phpInfo() Documentation
<?php phpinfo(); ?>

It should look like this:

You can inspect your options and if you want to change anything, your php location is here:


Install MySQL

Next you’ll need to install the MySQL server. This is also super easy:

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

MySQL will ask you for a password. You really shouldn’t leave this blank, even if it is just going to be on your local machine. It only takes a second to do and some applications will require a password of some type on the server.

Test your server to make sure it’s working properly.

mysql -u root -p
<Enter Password>
show databases;

It should look something like this:

Now you’re up and running!

You may want something to manage your MySQL data, I realize not everyone is as crazy about the prompt as I am. PHPMyAdmin is great:

sudo apt-get install phpmyadmin

Connecting Localdb using Sql Server Management Studio Express

1. (localdb)\V11.0 as the server name
2. Note that the instance name V11.0 is case sensitive

My Thanks to ( for the below

You can interact with SqlLocalDb using the command line. The following will tell you the version of SqlLocalDb:

C:\> SqlLocalDb info



If you want to create an instance:

C:\> SqlLocalDb create "MyInstance"


LocalDB instance "MyInstance" created with version 11.0.

To  Start the instance:

C:\> SqlLocalDb start "MyInstance"


LocalDB instance "MyInstance" started.

You can also create an instance and start it in one command using the -s argument:

C:\> SqlLocalDb create "MyInstance" -s

To stop and delete an instance, you can issue two commands:

C:\> SqlLocalDb stop   "MyInstance"
C:\> SqlLocalDb delete "MyInstance"

If you try to just delete the instance without first stopping it, you will get this error:

Delete of LocalDB instance "MyInstance" failed because of the following error:
Requested operation on LocalDB instance cannot be performed because specified instance is currently in use. 
Stop the instance and try again.

To check on the status and other details about an instance, you can run:

C:\> SqlLocalDb info "MyInstance"


Name:                MyInstance
Version:             11.0.2100.60
Shared name:
Owner:               METEORA\AaronBertrand
Auto-create:         No
State:               Running
Last start time:     4/29/2012 6:17:24 PM
Instance pipe name:  np:\\.\pipe\LOCALDB#ABB78D50\tsql\query

Wide tables in SQL Server 2008

SQL Server table supports up to 1024 columns per table which is typically good enough for most of the cases. However if you need to expand a table beyond 1024 columns then you need to use a special table types named as Wide Tables. Wide tables are tables which can have more than 1024 columns and can actually have up to 30,000 columns.

Thanks to  :