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.
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.
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).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.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.PHPMyAdmin This is somewhere between, and is a web-based solution. You'll need to install the
php5
andphp5-mysql
packages, and a web server (such as lighttp or apache, either of which PhpMyAdmin should give you the option to configure), then install thephpmyadmin
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).
Update 2016: Sqlectron is a new cross-platform lightweight SQL client, built on Github's Electron system. I haven't had a chance to play with it, yet, but as I understand it, it's a lighter weight option for Mac and Linux environments than some of the former options.