|
麻烦翻译一下,下面这段文章:xhan ; n0 S. G. B% n, X& S' B7 Q6 s
" Z6 w& u- H6 }# b& X8 O0 ]
-
; j9 \$ ]) k1 n: O0 N$ t0 } - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######& q# K& a6 R+ u. E7 d# ?/ o
) u5 o8 H3 R6 w8 P7 {( o- ### What we need ###! U0 `. y, n+ Y3 L2 J
- Naturally, we will need a MySQL server to store the data for us, this document : u& n+ _* J, S" \( \$ ?# m: M
- will not explain how this can be done - there are documents out there for the
, o/ E+ b- O1 _9 I - interested. The requirements include a (empty) database for TeamSpeak to use, U% A6 d0 X: ~0 l+ s/ @8 T( G
- and a user account (username + password) that has the permissions to do stuff+ K4 I! D' _. t+ ] K+ _/ @: n
- with the database. Additionally, you will need a vendor library installed on the4 z- w- [% c3 N; \' j
- local machine, this came with my MySQL install.) b. i5 O! r* r8 h, `) _
- These instructions will not tell you how you might transfer your data from the: e7 Q9 f4 x* b
- SQLite database to the MySQL database, we start with a clean and empty MySQL
" R/ P( R' Z0 h+ M, W( z, L2 g" c6 N - database.
( Q& N7 B2 ?+ a; W - Some users have reported ways to import a SQLite database into MySQL, but at
/ r+ r8 C$ D+ {4 l: m2 V - the time of writing, there are still too many issues - check the current status
# S; d8 w* x/ _" a - in the TeamSpeak forums if you are interested.
0 f5 h6 T' ~+ X! \) L0 i+ @ - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 W7 _# c! Q9 |8 J! z( m - Borland was used. This driver can only interface with the client library that 2 b) _% C# u7 z" c% D9 w9 t
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this1 i& U9 Q a1 e* V4 {8 }
- client library - basically all you have to do is to use a 3.x client library as
* s4 Z' ^( `5 f E) b; V, f" l# c - "VendorLib" and a 4.x database to connect to.
. G2 D/ I1 p/ P0 Z" U - If you need more info about dbExpress, you can contact Borland.3 R8 A1 m) x4 X# s4 i; s
4 ^' T: C+ M5 P- R7 f' |( t; }+ S- ### Doing the work ###+ k$ |: O: P3 L/ u( a
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all, C1 F4 |# |3 }7 L( k
- the perquisites right, just open your server.ini file, and add this section at8 E! t8 y8 X) ?, u6 u
- the end:
7 U* b9 T, L2 k' j& b$ T - ---cut here---6 Y! r7 r' h, U3 J; a) S. F
- [DBEXPRESS]7 |. l. `& h" Q, ?9 O- S9 I. M U8 I
- sqldir=mysql_sql- `, @ J3 p' I9 v' G
- Drivername=mysql
/ c9 U) W4 n: t0 q+ `) W: y1 Y - Database=Your_Database_Name_Here
+ a( Z! @* l- ~+ I/ ?4 I - Hostname=The_PC_the_MySQL-Server_is_on3 x" q6 Q: ^) |6 S. d' L
- User_name=User_name_on_the_MySQL-Server" T! t3 m: l# i6 j) k) w, k& l% g
- Password=Password_to_go_with_above_user_name
5 S3 c8 V$ Y8 Z! K8 F8 B4 v- ` - GetDriverFunc=getSQLDriverMYSQL8 h# d7 G; ~& }" U
- VendorLib=path_pointing_at_your_mysql_vendor_lib$ Q w* V) C1 T$ o, A
- LibraryName=path_to_libsqlmy_libary
6 C0 c+ Q3 n* R9 H+ {3 c* l+ R8 }$ Z - Active=11 }4 \! M( H% b
- ---cut here---8 { p1 ^- }* l! y8 T" P& r
- In my environment (a linux box with a MySQL server running locally) I have:
5 K, M' ^9 Q# u* W$ E - ---example---- W4 A3 e" U6 L
- [DBEXPRESS]
L+ M. I( b2 A3 X+ }6 T0 Z - sqldir=mysql_sql; S( _" O4 Z9 {( B- h: D
- Drivername=mysql
, ]/ W; X; R* C9 P) }+ K - Database=test4 D5 F8 i9 s; H1 i0 Q) m M
- Hostname=localhost
8 K4 C1 @, M. z5 ^0 B! N5 B) I - User_name=testuser* S0 `. [" D3 w G, C; V3 M/ R
- Password=my_password
( H: J3 `, f9 y9 @! _ - GetDriverFunc=getSQLDriverMYSQL% Z1 I, r% z7 M0 E5 c
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- K3 ^2 q% x- e; D, e - LibraryName=./libsqlmy.so$ W+ W1 y3 O! [$ y! Q
- Active=1
" k* A, m8 ~3 P. B! Z! B2 J* V1 n - ---example---
7 F$ o5 X6 p; p+ m, }
, }0 D! g) g9 w r1 y. ?- On a windows box, also running the MySQL server locally, it would be: y( P+ y2 G* k% F: R4 m
- ---example---& z+ X5 h& y1 A* K4 i! O
- [DBEXPRESS]/ [. [5 Q! `; v$ h% n. \
- sqldir=mysql_sql
u% l" [$ n1 ~/ o* ? - Drivername=mysql5 K6 }3 d, b+ M J0 j5 @3 [. B$ ^
- Database=test
, h1 M } Z5 Z! a- v+ h& N - Hostname=127.0.0.1( J) |' E- b5 C1 U
- User_name=testuser
; W) F& }; x- {: A( _" M4 H - Password=my_password) N' W. w+ G- c B5 H
- GetDriverFunc=getSQLDriverMYSQL+ A5 p: }7 }' A! L: d+ B% }
- VendorLib=libmysql.dll- q" a8 N4 f) Q9 c! Z
- LibraryName=dbexpmysql.dll3 Y% u$ ^2 n6 M' U
- Active=10 z5 z3 g& Z; W$ N' i
- ---example----, [( b; ]$ p! n
- - written 02.03.04 by pwk.linuxfan
1 o; A# Y! B1 `" ^4 a
. g: T/ ^4 F! m, I* ?& B; o. ^
复制代码 |
|