Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've recently been finding myself writing more SQL, on Windows with MSSQL and LinqPad and while I want to experiment on Ubuntu to get more of a handle on databases and I have no love lost for MSSQL, I'll be using MySQL I do want to find a LinqPad equivalent.

What I mean by this in more concrete terms is not the most powerful tool but more of a scratch-pad like LinqPad is, where a novice can quickly write down a query and run it to see what happens, also something which is fast to start and run.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

LinqPad is basically a gui front end for MS-SQL Server. In that sense, you have several options, but remember that you'll need to install MySQL server (sudo apt-get install mysql-server in terminal) to use them. Additionally, you'll probably want create and populate a database to play around with. The biggest difference will be that you won't be able to use Linq syntax, because Linq is a .Net syntax (you can, however, get similar syntaxes by getting into some of the languages and frameworks, the most closely-resembling probably being Ruby or Python).

  1. MySQL's built-in terminal application. You'll have to install mysql-client (which you'll probably need if you do any PHP/Python/Ruby development, anyway), but then, you can open up a terminal and type in mysql -u[a mysql user] -p (-p if the mysql user has a password, otherwise just leave the -p off). That will bring up a mysql console, which you can then run SQL queries directly in.

  2. MySQL Workbench This is a more full-featured database management GUI more similar to Management Tools than LinqPad, but it features a SQL query editor that allows you to run queries to your heart's content. You can find this in the repos as the mysql-workbench package.

  3. PHPMyAdmin This is somewhere between, and is a web-based solution. You'll need to install the php5 and php5-mysql packages, and a web server (such as lighttp or apache, either of which PhpMyAdmin should give you the option to configure), then install the phpmyadmin package. Open your browser and navigate to the URL you created for it, and you can play with SQL in the "SQL" tab, again to your heart's content.

I personally prefer Workbench, or just the plain terminal application for most things.

share|improve this answer
Thanks, did not know about this tool, it even queries Stackexchange. –  Luis Alvarado Feb 11 '13 at 20:35
Rather than MySQL, consider using MariaDB - a fork of MySQL by the original creator of MySQL, Monty Widenius. MarisDB is an enhanced and binary-compatible drop-in for MySQL and frees you from the potential tyranny of Oracle in the future, depending on where they take MySQL. See www.mariadb.org –  Clive van Hilten Feb 11 '13 at 20:44
Thanks I'm looking for something more than the built in terminal application and less than the workbench for now. Also I know about phpmyadmin but I don't like the interface and that it runs in a browser. –  Bora George Feb 11 '13 at 20:44
LinqPad is something slightly different than db management tools such as those you list, although there is an overlap in features. The db management tools are usually feature complete regarding their respective databases. LinqPad, for example, doesn't do users, security, stored procedures, triggers, etc. - or in fact any data manipulation resulting in any non-trivial update and insert statements. On the other hand, LinqPad is very useful as a generic .NET REPL. As such I recommend it for anyone doing .NET, even in the absence of any database work. –  John Apr 2 '13 at 10:31
@John - Actually, LinqPad does have update capability, though GUI access requires upgrading to the premium edition. You can also write and run stored procedures (and probably edit permissions, though I haven't tried) via LinqPad, provided you know the proper SQL for it. –  Shauna Apr 2 '13 at 14:43

I have to disagree with the basis of Shauna's answer; LINQPad is not a MS-SQL gui or frontend. It is a .NET scratchpad which can generate a LinqToSql context for supported data contexts. This makes it fundamentally different from typical SQL clients (such as SQL Server Management Studio or MySql Workbench).

Out of the box LINQPad ships with drivers which support MS-SQL, however additional drivers can be easily installed and can add support for other data sources--including MySql.

For your specific question the answer is that the closest think you'll find that can run natively on Linux would be a custom .NET application written with Mono (version 2.6 added LINQtoSql support).

However, if you need to use LINQPad with MySql you easily can using the IQ driver. You will still need Windows to run LINQPad (or, possibly wine). I personally keep a Windows VirtualBox on my Linux development station specifically for a handful of tools such as LINQPad which are windows-only.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.