|
|
麻烦翻译一下,下面这段文章:xhan
7 j+ s8 i4 m3 E, p& A% l9 }& m% F' M+ r0 ~/ |+ g% D$ G/ o: y
- t0 J- n G' H$ B ~" P& T
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
. M* s2 T6 z7 A' r) l - . d: Q" N/ r. N& E+ r# z5 _; G
- ### What we need ###
3 P" i k( V% [" G$ h+ A% N; } - Naturally, we will need a MySQL server to store the data for us, this document & @$ n+ V. T1 j
- will not explain how this can be done - there are documents out there for the ' L9 D- [) `, P1 o3 r
- interested. The requirements include a (empty) database for TeamSpeak to use
5 w3 [2 B' i' m3 L. ^0 b$ | - and a user account (username + password) that has the permissions to do stuff
; H/ T4 a8 ~! M& C7 r% A - with the database. Additionally, you will need a vendor library installed on the
, r! T g4 k* Z" m( \ - local machine, this came with my MySQL install.: |3 S& ~4 ?& v* @% T% O- Q
- These instructions will not tell you how you might transfer your data from the+ L5 m& u9 n* i$ Y) i
- SQLite database to the MySQL database, we start with a clean and empty MySQL
( U% ~2 g1 \( B+ G7 j0 Z3 Y - database.5 t& a, j( l( k
- Some users have reported ways to import a SQLite database into MySQL, but at
6 z [3 L$ A& `- p9 \0 J' L5 W - the time of writing, there are still too many issues - check the current status
+ m, z9 S, n0 u3 G! B- I - in the TeamSpeak forums if you are interested.
, \1 J p0 D( F W% v( p - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from8 A) R$ w" O2 c5 L) z! w( \/ R
- Borland was used. This driver can only interface with the client library that
% y" P8 z- \9 A6 h6 ~+ m - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, t0 C& W0 D$ @
- client library - basically all you have to do is to use a 3.x client library as
. g9 R }$ x( l5 N. x: \ - "VendorLib" and a 4.x database to connect to.. r H2 e7 H3 d" k( _" C
- If you need more info about dbExpress, you can contact Borland.! T3 v- H& \" e. U8 u7 }; b: v
$ c Q: d6 T& |, [5 E: F4 v- ### Doing the work ###. j1 a! ?) Q+ _6 C" k
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all3 r+ b7 g3 ~8 d/ f
- the perquisites right, just open your server.ini file, and add this section at5 g8 Y5 _( z; w
- the end:
2 ?/ G/ `- w3 f# D2 R3 v - ---cut here---
% c. L A7 s% C7 N# m2 b5 n. v/ R - [DBEXPRESS]
7 n6 E7 P; r. P+ l4 Y1 F - sqldir=mysql_sql
8 ^2 N6 A; d, c5 u9 [6 ^9 x - Drivername=mysql
+ t$ S$ O8 I' F b ^2 w - Database=Your_Database_Name_Here9 r3 \; u7 U q. L D
- Hostname=The_PC_the_MySQL-Server_is_on
0 O/ e8 z1 c$ t - User_name=User_name_on_the_MySQL-Server
, h6 m$ V! @# c" P2 s - Password=Password_to_go_with_above_user_name
( L4 ~ [" M) ?1 ^; k. p - GetDriverFunc=getSQLDriverMYSQL
5 }4 ~7 `6 _+ s - VendorLib=path_pointing_at_your_mysql_vendor_lib
( V+ @! W/ b6 N- I0 W) w, f4 |$ f - LibraryName=path_to_libsqlmy_libary% V2 t/ C% T: Y/ ^
- Active=12 G7 Y- Y% ]4 i2 { n
- ---cut here---
2 U7 V5 x' ?5 s4 A - In my environment (a linux box with a MySQL server running locally) I have:
+ ]6 K4 I% [% d; | - ---example---' a" }) X& b" M& @9 [( `2 Z
- [DBEXPRESS]
, y$ ~0 ?, v( z& s3 R6 @1 y - sqldir=mysql_sql
0 u$ C- P8 b7 u+ N" g$ Z - Drivername=mysql
2 X5 i/ @ X) u - Database=test
/ y7 h, H9 `$ N; v - Hostname=localhost
* f$ H/ L& ^: z" T - User_name=testuser. F8 O8 q& H& S4 Q; j, V- z
- Password=my_password
. A) \( x, Y, a3 t - GetDriverFunc=getSQLDriverMYSQL
2 i, l3 |& o$ P* n) I - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 L+ o5 y ?2 ?4 S9 P
- LibraryName=./libsqlmy.so$ R) T# w6 ^% J2 h& x9 E- ]& g: Y/ Y1 c1 q
- Active=1
+ Y. u' U7 W% ~0 E/ _2 Z& \/ | - ---example--- x/ c$ \; y& i5 G) f; P
" _" P4 r, c* c P! u5 d$ w. F- On a windows box, also running the MySQL server locally, it would be:
3 n% }6 o: Z# e: ` - ---example---( q- k3 J* e" ^9 N# C3 H1 E7 v
- [DBEXPRESS]. `( d' X# D% C( }/ V
- sqldir=mysql_sql
$ ~6 H( ~5 @% Q5 `) c1 h - Drivername=mysql
$ R( F7 a( g8 w1 k( W: C - Database=test/ \( O. K5 @% R! g/ T
- Hostname=127.0.0.1
- t; u4 E6 U# A$ ] - User_name=testuser
( D4 J! q& `! k; G/ X( M+ T( m8 Q1 ~ - Password=my_password
/ O! G- Z# y3 J# a - GetDriverFunc=getSQLDriverMYSQL; \2 Z R! p" j. v, z0 k1 s' q! ]
- VendorLib=libmysql.dll# X- ~5 B1 P0 G4 T( K5 a
- LibraryName=dbexpmysql.dll
* d$ O3 M2 D; X0 |+ P5 g, T6 @ - Active=13 ^+ _2 B/ [7 K- v, z: {& i9 s; x
- ---example----( R. X8 V$ p# e) D1 s
- - written 02.03.04 by pwk.linuxfan: ]' T# [ J3 T j8 `
. T$ \0 L! U! }
复制代码 |
|