Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
-4
rated 0 times [  -4] [ 0]  / answers: 1 / hits: 7720  / 3 Years ago, sat, june 19, 2021, 10:20:56

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.


More From » mysql

 Answers
5

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



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.


[#32734] Saturday, June 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
needstar

Total Points: 268
Total Questions: 108
Total Answers: 117

Location: Seychelles
Member since Mon, Jun 28, 2021
3 Years ago
;