ActiveState Community

MySQL Console

Posted by tswicegood on 2007-04-04 10:48
OS: All / Any

Howdy all again,

Now it's time for an extension that actually does some extending :-) This provides a simple console into MySQL. There's a lot of places to take this, but seeing as how this was just for kicks, this version is pretty basic.

It provides a place for the host, username, and password, and then of course a place for queries. It assumes you're using SQL standards in writing your queries and not using quotation marks. Which we all do, right? :-) This assumes you have the mysql-client package installed. Though, I've only tested it in Ubuntu, it should work on any OS that'll allow you to execute 'mysql' from the command line.

The code is available via SVN for anyone curious about executing external programs, JS namespacing, or just generally curious:

http://domain51.googlecode.com/svn/komodo/mysql-console/trunk/

Hope you find it useful,
-Travis

AttachmentSize
mysqlconsole-1.0.xpi26.59 KB

PeRKoniX | Thu, 2007-05-31 02:21

Nice, it works very well :)

But, I changed a couple of things. The textbox is not multiline enabled, wich should be because mysql provides his result in table format. Secondly I added a extra input field to select a different database, because in your version, the default database is always used.

But from that, thank you very much! I wil use this extension allot!

cheesegrits | Thu, 2008-01-03 16:39

I'd love to take the mysql console extension for a test drive, but it tells me it is only compatible with 4.0 when I try and install it.

-- hugh

ToddW | Thu, 2008-01-03 17:05

Until Travis has time to update this, you can always try making a manual override by:

  • unzipping the install.rdf from the xpi file
  • modifying the version number to be 4.*
  • repack the install.rdf into the xpi (zip) file
  • install it

Cheers,
Todd.

vifito | Sat, 2008-05-03 10:23

I was searching for a extension that it allow me to handle SQL Sentences. I tried "MySQL Console" and it's useful, but I had finally added a command that execute mysql for me:

mysql --host="%(ask:Host:localhost)" --user="%(ask:User:root)" --password="%(ask:Password)" --database="%(ask:Database:mysql)" --execute="%(ask:SQL)" --html > /tmp/mysql.html; %(browser) /tmp/mysql.html

It is for my GNU/Linux system but the adaptation to Windows is simple