Trying to connect to a different database with '\r <database>' from the mysql
command-line tool is broken (and has been for a couple mysql releases).
mysql> \r mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Connection id: 108
Current database: mysql
You'll notice that the mysql program has not gone to the mysql> prompt but
is waiting for further input from the user. This does _not_ happen if you
use 'connect <database>'. You can get back to the prompt by entering a
semicolon (;) and hitting enter (you'll get an error:
ERROR 1064: You have an error in your SQL syntax near 'mysql
;' at line 1
but at least you'll get to a prompt). This also happens on the linux version.
Try to use \r to connect to a specific database by name and it will
work every time.
Don't use the '\r <database>' syntax--instead, use 'connect <database>'
as a work-around.
>Submitter-Id: <submitter ID>
>Originator: Jason Axley
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis: '\r <database>' mysql syntax is broken
>Release: mysql-3.22.22 (TCX binary)
System: SunOS nofud 5.6 Generic_105181-13 sun4u sparc SUNW,Ultra-1
Some paths: /usr/bin/perl /usr/local/bin/make /usr/local/bin/gcc
GCC: Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.6/220.127.116.11/specs
gcc version 18.104.22.168
Compilation info: CC='gcc' CFLAGS='-O3 -fomit-frame-pointer' CXX='gcc' CXXFLAGS='-O3
-fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS=''
Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=TCX binary'
Perl: This is perl, version 5.004_04 built for sun4-solaris
|• '\r <database>' mysql syntax is broken||jason.axley||20 May|