Spec-Zone .ru
спецификации, руководства, описания, API
|
A typical situation where you would install Connector/ODBC is to access a database on a Linux or Unix host from a Windows machine.
As an example of the process required to set up access between two machines, the steps below take you through
the basic steps. These instructions assume that you connect to system ALPHA from system BETA with a user name
and password of myuser
and mypassword
.
On system ALPHA (the MySQL server) follow these steps:
Start the MySQL server.
Use GRANT
to set
up an account with a user name of myuser
that can connect from system BETA
using a password of myuser
to the database test
:
GRANT ALL ON test.* to 'myuser'@'BETA' IDENTIFIED BY 'mypassword';
For more information about MySQL privileges, refer to Section 6.3, "MySQL User Account Management".
On system BETA (the Connector/ODBC client), follow these steps:
Configure a Connector/ODBC DSN using parameters that match the server, database and authentication information that you have just configured on system ALPHA.
Parameter | Value | Comment |
---|---|---|
DSN | remote_test | A name to identify the connection. |
SERVER | ALPHA | The address of the remote server. |
DATABASE | test | The name of the default database. |
USER | myuser | The user name configured for access to this database. |
PASSWORD | mypassword | The password for myuser . |
Using an ODBC-capable application, such as Microsoft Office, connect to the MySQL server using the DSN you have just created. If the connection fails, use tracing to examine the connection process. See Section 22.1.4.8, "Getting an ODBC Trace File", for more information.