|
|
麻烦翻译一下,下面这段文章:xhan
) P" g5 {7 l c1 O( c7 ?& ]! T- ~9 t% A* i, v3 W
-
+ D( U3 A/ E+ [* h) ~ | - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
& C( g$ p4 l1 i, p" F" O - 1 ]6 _4 k7 q' x Q2 P, N; u
- ### What we need ###6 s% e: M0 u4 D, y2 X6 q8 p
- Naturally, we will need a MySQL server to store the data for us, this document
) \. Q# Y# w5 @ M( `4 a - will not explain how this can be done - there are documents out there for the
. g" y8 J+ a" E; A9 h# o - interested. The requirements include a (empty) database for TeamSpeak to use
+ n% x8 {2 y# w3 x9 E5 O1 X; u - and a user account (username + password) that has the permissions to do stuff. ]+ ?" a: N, c
- with the database. Additionally, you will need a vendor library installed on the! W% m3 {8 X9 ^. _3 F. Z
- local machine, this came with my MySQL install.( R; ~0 F0 a5 w! s% c' [" t9 |
- These instructions will not tell you how you might transfer your data from the3 p9 w- C$ ]3 y! s$ ~: N. M
- SQLite database to the MySQL database, we start with a clean and empty MySQL
. l9 r2 z: ]4 d. ]& l - database.
; e* P/ Z5 W' C( F - Some users have reported ways to import a SQLite database into MySQL, but at
5 x7 w: g3 m% @7 O: m: {! Z4 R - the time of writing, there are still too many issues - check the current status; Y+ K2 w. |) R7 z$ e! g* V; u
- in the TeamSpeak forums if you are interested.
4 D& O7 G7 J+ ^ c4 G - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 o* O) @& `4 d7 X& i' L- m$ E4 S - Borland was used. This driver can only interface with the client library that
2 g: l' F9 y2 d: g. Y" ?% E& } - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 X( B. k2 R# _. L9 k2 `9 Y0 I
- client library - basically all you have to do is to use a 3.x client library as
) g/ l) ]3 ^2 S - "VendorLib" and a 4.x database to connect to.3 V( J, I5 w7 v( B; `
- If you need more info about dbExpress, you can contact Borland.
5 k6 E9 E( l4 w' i7 A
3 T& p) r% O& a; h- ### Doing the work ###
( W$ Z# U0 S/ _ X2 D( o - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all g+ d+ O; U. o; C
- the perquisites right, just open your server.ini file, and add this section at
$ K$ g8 p F" w# ]% Y - the end:
2 u# f5 N9 o1 C" ^) g. Z - ---cut here---! \ i q! D! e
- [DBEXPRESS]
4 L" e7 U: e# b4 A* w, K7 D/ T - sqldir=mysql_sql
0 v# j* T2 |' A# t! Q7 W4 G - Drivername=mysql$ f ~: q+ l* d, |1 ` F4 ~
- Database=Your_Database_Name_Here \, S& X) A; W8 V+ }3 G3 H
- Hostname=The_PC_the_MySQL-Server_is_on" d2 P) g/ q3 _. c& z
- User_name=User_name_on_the_MySQL-Server
* J0 b; S' G: w- o( V - Password=Password_to_go_with_above_user_name
: ~1 R( C8 K$ _' W! A$ R& I0 a: E - GetDriverFunc=getSQLDriverMYSQL1 z5 s. G C% S' V; C N
- VendorLib=path_pointing_at_your_mysql_vendor_lib
) V8 |% {. ?3 I# \$ H: q - LibraryName=path_to_libsqlmy_libary6 ]2 P3 g' X/ Z9 D
- Active=1
% S# @( a- m( \, d - ---cut here---
}" ]- ~' h3 X) r - In my environment (a linux box with a MySQL server running locally) I have:, y% ]& k: r* D- M; u* s8 u- J
- ---example---9 Y; t' U' T3 X" X, e& k
- [DBEXPRESS] y7 D* W8 A' I( R% B) |9 X; M+ r
- sqldir=mysql_sql
5 j7 r& T- n# \ - Drivername=mysql9 ?7 {: s g, S3 h C' O
- Database=test
7 u) W: _& H: O4 |) g - Hostname=localhost
+ p. u% N( ]; m+ S9 @ - User_name=testuser
# W; |9 A& l5 E - Password=my_password
- g! `" A! p9 q2 W$ M - GetDriverFunc=getSQLDriverMYSQL
7 i, J: s3 ~* z. e- G; q - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: a9 C, H: T* ~( j* J - LibraryName=./libsqlmy.so
% o; G* L- l1 O - Active=1; z1 F" S( z+ ^" g0 K9 S3 P
- ---example---
( ?9 H6 @2 f9 w0 S* V" G1 R - 8 y2 p3 V: Q) X* j$ g& }4 Q
- On a windows box, also running the MySQL server locally, it would be:
& u ]+ s& p* v. _ - ---example---. ~ K3 \, W$ S
- [DBEXPRESS]6 x5 K$ O& x# Q
- sqldir=mysql_sql
- ?) V6 C& H" u% d - Drivername=mysql' m0 q% l1 A& O
- Database=test
# s) g3 b! l5 Q/ j, ?1 i/ T0 V - Hostname=127.0.0.12 s) I1 x) N+ s7 B! ]1 Q0 y) I
- User_name=testuser1 W6 m" a, `/ ]" r r: J/ P/ {/ Q
- Password=my_password! r/ k: Y X3 ]' G, c: D _
- GetDriverFunc=getSQLDriverMYSQL
6 F# z6 O% n( l; V. u {1 B - VendorLib=libmysql.dll1 }, t3 s% B$ P* h. q
- LibraryName=dbexpmysql.dll
- u% L* d- ?2 v - Active=13 [" J' t$ T& ]1 g p6 Z
- ---example----
2 @7 s Y7 x& N4 D2 ~+ _ - - written 02.03.04 by pwk.linuxfan: M" B }5 T+ a, Z- v
6 d8 Q; d! d, w' b8 O, p
复制代码 |
|