A typical installation situation where you would install Connector/ODBC is when you want 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 want to connect to system
ALPHA from system BETA with a username 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
username 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 Sección 5.7, “Gestión de la cuenta de usuario MySQL”.
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 username 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 Sección 25.1.3.8, “Getting an ODBC Trace File”, for more information.
Ésta es una traducción del manual de referencia de MySQL, que puede encontrarse en dev.mysql.com. El manual de referencia original de MySQL está escrito en inglés, y esta traducción no necesariamente está tan actualizada como la versión original. Para cualquier sugerencia sobre la traducción y para señalar errores de cualquier tipo, no dude en dirigirse a mysql-es@vespito.com.