« MySQL/Manipulation de base » : différence entre les versions

Contenu supprimé Contenu ajouté
Ligne 157 :
Pour d'autres options : <code>man odbcinst</code>
 
Il faut créer au moins un {{w|Data Source Name|DSN}} (''Data Source Name'' ou ''Data Set Name''), parce que chaque connexion ODBC avec OOo est initialisée avec.
 
Pour créer un DSN, il existe différente possibilités :
{{traduire}}
* Modifier <code>/etc/odbc.ini</code> (concerne tous les utilisateurs)
First of all, we have to create at least one DSN (Data Source Name or Data Set Name), because every ODBC connection is initialized through an existing DSN. It's true in every cases, so it is required for an ODBC connection from OOo.
* Modifier <code>~/.odbc.ini</code> (concerne un seul utilisateur)
* UseUtilise graphicalles applications suchgraphiques ascomme '''ODBCConfig''' (Debian : <code>unixodbc-bin</code>, Fedora : <code>unixODBC-kde</code>). Finally, these graphical applications modify '''/etc/odbc.ini''' or '''~/.odbc.ini'''
 
Finalement, ces applications graphiques modifient '''/etc/odbc.ini''' ou '''~/.odbc.ini'''.
To create a DSN, one have different possibilities :
* Modify /etc/odbc.ini (concerns all users)
* Modify ~/.odbc.ini (concerns a specific user)
* Use graphical applications such as '''ODBCConfig''' (Debian: <code>unixodbc-bin</code>, Fedora: <code>unixODBC-kde</code>). Finally, these graphical applications modify '''/etc/odbc.ini''' or '''~/.odbc.ini'''
 
ForPar instanceexemple, aun fichier <code>/etc/odbc.ini</code> file (thele namenom of thedu DSN isest betweenentre bracketscrochets []) :
[MySQL-test]
Description = MySQL ODBC Database
Ligne 175 :
PASSWORD =
DATABASE = mysqldatabase
InDans thatce casecas, thele DSN isest calledappelé '''MySQL-test'''.
 
ThenEnsuite wepour can testtester, usingutiliser la commande '''isql''' command:
 
$ isql -v MySQL-test user1 PassUser1
Ligne 199 :
SQL> quit;
 
Depuis OOo :
And now, from OOo:
-> File
-> New
Ligne 215 :
-> Finish
 
 
{{traduire}}
At that step, one is connected to the '''mysqldatabase''' database, under the user '''user1'''. Just before accessing the database, for example to create tables, one will give user1 password.
Then, through OOo, it is now quite easy to access and manipulate the database. We can just notice that Java is required in the following cases :