Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 0 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.

Update: JetBrains has been working on a plug-in/standalone SQL client similar to MySQL Workbench. The standalone version is called 0xDBE, but you can get it as a plug-in if you already use one of JetBrains' other suites (WebStorm, PHPStorm, etc). It's about a step or two below Workbench's power in some areas (it doesn't have Workbench's reverse engineer and data modeling), but has the advantages of integrating into what may be your existing development environment and supporting multiple database systems if that's what you need. It's also cross-platform, like the rest of their IDE products. I've been using it for some time as part of the early access program and it has proven to be rock-solid and a great scratch-pad like tool (albeit a bit heavy compared to LinqPad if you use the standalone version).

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 – 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
While things might change in the relatively near future with the open sourcing of the .Net framework, LinqPad currently cannot run natively on non-Windows systems due to its use of WPF and Mono's lack of WPF implementation ( WineHQ currently has no information on LinqPad, specifically, and it appears to use Mono for its default .Net implementation, anyway ( .Net proper may work (more or less, at least), but can be hairy to set up ( – Shauna Dec 29 '14 at 20:20
I recall (but might be wrong) that LINQPad uses some 3rd party components which are Windows-only. Either way, MySQL Workbench has become a decent tool that is fully at home in Linux, and if LINQPad is really required then a VirtualBox Windows machine works great--I switched away from .NET dev a while back and keep a windows VM for a few utilities (mainly Fiddler, anymore) and its a convienient way to have the windows tools when you really need them in a Linux environment. – STW Dec 30 '14 at 0:08
+1 the other answer is incorrect, LINQPad is far more than a GUI for SQL Server. – Ian Newson Sep 25 at 14:45

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.