<p>I mainly use the MySQL GUI tools. This allows me to easily see the results in a table as well as to quick edits and bookmark frequently run queries. This suits my needs far better than the command line.</p>

<p>I remember when I used to do this on Oracle DBs years ago I could put variables in the query itself, so that when running the query I got prompted for the variable.</p>

<p>e.g.</p>

<pre><code>select email from users where login = [VAR]
</code></pre>

<p>And when you run the query the system prompts you for VAR and you can type in <code>john_smith14</code> and it executes the query. This is really useful for adhoc queries which you run a lot.</p>

<p>Yes I know using shell scripts and the command line this could be done more easily, but for several reasons aside from this, shell scripts are not a good solution for me.</p>

I'm not sure if there's a way to get the GUI tools to prompt you for a value, but you can certainly use variables in MySQL.
```
```
SET @myVar='john_smith14';
SELECT email FROM users WHERE login = @myVar;
```
```
That might even suit you better, since you don't have to keep typing in the variable value each time..?