开发者

osx mysql gui with plain text output?

Is there an osx mysql gui, which can run a script containing multiple statements, and will display the plain text output from the database, rather than in an excel like grid?

I want to be able to see error messages and multiple sets of data all in the same window as I can when using the windows sql server client.

Sequel pro seems to get a lot of recommendations, I like sequel pro, but have found that it won't display multiple record sets, and won't call procedures which return record sets, and it doesn't seem to allow multiple documents open.

开发者_StackOverflow

I realise that the command line tool is available, but would like the convenience of a text editor. Perhaps there are some scripts to integrate a text editor with mysql that can do this? I am currently manually running my saved files:

mysql> . /Users/compoundeye/Documents/dev/script.sql

but it would be nice to be able to just run selected text without saving.

I have textmate, and would be very happy if i could get the sql bundle to do what i want, but it doesn't seem to allow compound statements or stored procedures which return record sets.

does anyone know of alternate scripts for a text editor?


Yes, you can do this using Oracle SQL Developer (free). While it's not a native MySQL client, you can download the MySQL JDBC driver and enable MySQL connections by going to Tools -> Preferences -> Database -> Third Party JDBC Drivers and adding and entry for the jar. Restart Oracle SQL Developer and you should be able to connect to MySQL. From there, you can use the "Run as Script" (2nd from the left) option, which will output the results in plain text:

osx mysql gui with plain text output?

As a side note, Oracle SQL Developer is great! I use it to connect to Oracle, MSSQL, and MySQL databases from my Mac.


Perhaps PHPMyAdmin might do the job for you? It's web based, so you could have as many windows open as you want. It does display results in a grid, but you can also export results to a file. It accepts pretty much any query.

Otherwise there are text editors that have a terminal built-in (BBEdit, Coda for example). Of course, you could always from commands right from the terminal/command line. Then you don't have to create script files.

mysql -u user -ppasswd -e "SELECT * FROM table LIMIT 10" > output.txt


DBVisualizer http://www.dbvis.com/ they offer a free version (With limited features) you could test out as well as a trial version (Full version), but full all the features I think you would need to paid version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜