I Try to use TM to connect to a mysQL database running on a PC on my network All access authorisations are OK And I can successfully connect from my Mac to the remote host with another mySQL gui.
When I try to connect with TM I get a message : Unknown system variable '' coming from mysql server.
Any Idea ? Thanks Alain
On 28 Oct 2007, at 04:03, Alain Couchot wrote:
When I try to connect with TM I get a message : Unknown system variable '' coming from mysql server.
Hi Alain,
That’s odd – looks like your server doesn’t have an encoding set. I’ve modified the SQL bundle to handle this gracefully, so you have the following options:
• If you are already using an SVN checkout of the bundle just update it • If you’re not then check the manual under “Getting New Bundles” for information on how to get it • You can use this patch to fix the problem:
====================== Index: db_browser_lib.rb =================================================================== --- db_browser_lib.rb (revision 8375) +++ db_browser_lib.rb (working copy) @@ -55,11 +55,7 @@ def get_mysql(database = nil) unless @@connector @@connector = Mysql::new(@settings.host, @settings.user, @settings.password, database || @settings.name, @settings.port) - begin - encoding = @@connector.query('SELECT @@character_set_database AS server').fetch_hash - rescue - encoding = {:server => 'utf8'} - end + encoding = @@connector.query('SELECT @@character_set_database AS server').fetch_hash @@connector.query('SET NAMES utf8;') if encoding["server"] != 'latin1' end @@connector
====================== Apply it in /Applications/TextMate.app/Contents/SharedSupport/Bundles/ SQL.tmbundle/Support/bin/
Or of course you can just wait for the next TextMate update, when you’ll get it automatically.
Ciarán
Thanks for your help and your patch I installed the new bundle without success Perhaps should I say that my dabase is configured in french language and the exact error message is in french :
Variable syst�me '' inconnue
Regards Alain
Ciarán Walsh a écrit :
Hi Alain,
That’s odd – looks like your server doesn’t have an encoding set. I’ve modified the SQL bundle to handle this gracefully, so you have the following options: