|
|
麻烦翻译一下,下面这段文章:xhan : @; g4 {* _1 Y9 _& N, W
& k( A7 i) ]7 s: }- " ?' B& W( }2 O `
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 ~2 G9 w4 D7 E& y3 J' d
- ^3 e' Z; g! @& P. }; K* ?; P- ### What we need ###
e' y" M7 b1 _ - Naturally, we will need a MySQL server to store the data for us, this document
) F z+ b$ ~( p8 b% R+ f. \$ \ - will not explain how this can be done - there are documents out there for the
3 ]5 O4 P; N' P2 J - interested. The requirements include a (empty) database for TeamSpeak to use# r. n) ]4 k$ L& u* b/ f! S2 {
- and a user account (username + password) that has the permissions to do stuff
0 D7 F3 t3 V. o0 q/ p5 H - with the database. Additionally, you will need a vendor library installed on the
: O4 X( M- l) ` [' h: r& w - local machine, this came with my MySQL install.
4 J$ s) C3 x0 M6 D& m9 Q; A - These instructions will not tell you how you might transfer your data from the
9 z2 e# e9 r3 O i5 J - SQLite database to the MySQL database, we start with a clean and empty MySQL
- x% o! V b0 Z3 O, J7 j+ \) I8 d3 b - database.
% H& F( i3 [/ c1 C - Some users have reported ways to import a SQLite database into MySQL, but at
) X/ S# e. [- j" ]& j* v% X+ ?8 i - the time of writing, there are still too many issues - check the current status
4 l" T" T+ S$ X; W% I* M - in the TeamSpeak forums if you are interested.1 M/ I. T& E" G- f
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from% [( j6 F8 O( g6 q8 X, c' H
- Borland was used. This driver can only interface with the client library that
1 o; p: Y; E$ f7 P B - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this- M/ w1 l, ^ t6 w+ @5 w
- client library - basically all you have to do is to use a 3.x client library as
6 \" ]& y, Q; H( } - "VendorLib" and a 4.x database to connect to.
" @, u) [, w! n - If you need more info about dbExpress, you can contact Borland.# u9 Y( A$ Q( w
2 {$ a" u" Q' L) z- ### Doing the work ###
7 |* E2 r$ ^, w7 |; Q: q - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 @2 d) W* S2 n! R, w" x
- the perquisites right, just open your server.ini file, and add this section at
; x- P+ w, D% t- u - the end:! b3 X: G4 t- e. N% \$ q
- ---cut here---8 K7 \3 j c$ u: f' m6 e V. M: q
- [DBEXPRESS]
1 s F. A& A, K/ k: D o/ M - sqldir=mysql_sql
4 ^6 E6 N9 E- c1 W - Drivername=mysql
3 F/ t: I) e5 ]' P) X - Database=Your_Database_Name_Here
0 Q3 ?8 m& S% q5 L - Hostname=The_PC_the_MySQL-Server_is_on
& ]- V ] L; a1 w& [9 M' R9 O0 r - User_name=User_name_on_the_MySQL-Server
1 Y2 N2 @% m" R* y$ Z - Password=Password_to_go_with_above_user_name; Y& o% L: ?* j3 [
- GetDriverFunc=getSQLDriverMYSQL
5 W+ R' ~' l9 [; x - VendorLib=path_pointing_at_your_mysql_vendor_lib8 w# K! U7 g. x$ C! I
- LibraryName=path_to_libsqlmy_libary
; m3 J$ X9 P* k - Active=1, l0 J" g8 T" m$ Z7 c! p" g' O
- ---cut here---* m2 o/ Y" c4 F! o# f
- In my environment (a linux box with a MySQL server running locally) I have:
" f6 K7 R; x& d n# Q3 n* h - ---example---9 f0 u+ {2 ]$ v. P( l7 y4 E
- [DBEXPRESS]
( ~ g9 g# Q8 X - sqldir=mysql_sql
5 v" w2 T( Q; s2 Z: _1 e - Drivername=mysql
5 W" \% S$ C$ J! R& Z- B9 ^ - Database=test
0 K( M' Y9 S, `8 [ - Hostname=localhost$ Z5 @8 V: v# J9 F- w% r
- User_name=testuser' W; s' Z9 b4 D2 o, D
- Password=my_password1 C6 B/ y4 A, G1 g4 k
- GetDriverFunc=getSQLDriverMYSQL
4 F9 Y$ E" U+ N/ K* W5 u+ O - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. S( x( J) |% D* P5 D. S
- LibraryName=./libsqlmy.so1 o4 x6 P* N C! F% M3 I% ~
- Active=1
% Z- X4 {/ |3 F. u1 S+ h - ---example---' q! D' R o+ Q$ g" z( x
& Y8 B( Y; u; E- On a windows box, also running the MySQL server locally, it would be:: |* h' Z% V2 Z5 s
- ---example---8 ?! J1 D4 L3 K5 n8 q/ J
- [DBEXPRESS]
4 Y' B7 _9 f! L) y/ r$ W. [2 E* J - sqldir=mysql_sql r% _2 b7 `- y
- Drivername=mysql( {& Y- W: k: O/ s3 u
- Database=test; F& R9 K# o* ?; b4 F0 a- y; n
- Hostname=127.0.0.1& V( D' w3 P' s. ~
- User_name=testuser
1 ?" g2 G3 V1 l# U( I q - Password=my_password5 V7 H0 z5 }9 Q7 R2 {" G
- GetDriverFunc=getSQLDriverMYSQL
; ~- }7 I* Y9 m5 ~. Y* t - VendorLib=libmysql.dll
0 ^1 T1 P: J: y - LibraryName=dbexpmysql.dll
! {% o" A, \4 U: w5 }3 @ I" C' R - Active=1$ w, e* P. B' g9 h& H
- ---example----6 Z6 r( d( U, B: q3 S5 Q
- - written 02.03.04 by pwk.linuxfan
+ o2 [: i1 J+ J% ~! _ c1 _
& G& ?- \0 {8 _5 q8 v! H7 I
复制代码 |
|