* Brian Menke
> I'm trying to specify a host name and database name to do an update to a
> table. I can't quite figure out what the correct syntax is? Is it
> something
> like:
>
> USE [EMAIL PROTECTED] I have tried several permutations of that but
> can't quite seem to get the syntax just right.

The hostname is used when connecting to the host, not when you change active
database (with the USE statement).

The syntax for USE is simply:

mysql> USE databasename

What server you connect to is defined in the connect statement of whatever
programming language you use, or on the command line if you use the standard
mysql client. Using the standard client it is however possible to change to
a different server, using the 'connect' client command, short '\r'. You can
swap to a different database on a different server using the syntax:

mysql> CONNECT databasename otherhost

A shortcut is defined, as mentioned. This will also work:

mysql> \rdatabasename otherhost

<URL: http://dev.mysql.com/doc/mysql/en/USE.html >
<URL: http://dev.mysql.com/doc/mysql/en/mysql_Commands.html >

--
Roger


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to