|
|
麻烦翻译一下,下面这段文章:xhan
* [/ m1 e# |7 a2 P9 q, B9 o
1 D. |4 _" Q1 D- 7 Q9 A& l1 L7 x, {. K
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######2 p, C. @0 l! G! [
- 8 z6 p( l6 d2 J1 C2 W
- ### What we need ###
# A, k! d8 a9 _0 y2 F/ ^* r4 m - Naturally, we will need a MySQL server to store the data for us, this document 3 I) `& I/ H$ J( z$ Y3 u7 {; ?1 T
- will not explain how this can be done - there are documents out there for the
5 Y% b7 n) t( M+ c1 X7 H - interested. The requirements include a (empty) database for TeamSpeak to use, m U* Z7 X2 a" x( a+ P# N
- and a user account (username + password) that has the permissions to do stuff
* t! r1 m* A$ Z6 o' ~, w - with the database. Additionally, you will need a vendor library installed on the* p: c6 k, C% a' {0 R! @2 p
- local machine, this came with my MySQL install.
* w- c6 A; i8 K" F1 y - These instructions will not tell you how you might transfer your data from the
7 O& p8 V# ?1 z1 R - SQLite database to the MySQL database, we start with a clean and empty MySQL
, z8 \: \1 [ J1 p - database.# V0 r" K( u6 T2 v k
- Some users have reported ways to import a SQLite database into MySQL, but at2 e- V/ E# g( @8 k( ~8 ~
- the time of writing, there are still too many issues - check the current status
! D7 a" w7 e: f/ @ ~ - in the TeamSpeak forums if you are interested.
8 s1 @6 R( g" } z% w% V+ Q - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 b/ X5 a/ y( c( d; m7 Q1 s% V
- Borland was used. This driver can only interface with the client library that - X+ R5 d, r: l) A
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this/ T6 n$ A$ S1 m M
- client library - basically all you have to do is to use a 3.x client library as , d- T8 ?# x5 E- p8 g0 _7 @; x& Y
- "VendorLib" and a 4.x database to connect to.
1 V7 y6 Y+ N5 G% Y; [ - If you need more info about dbExpress, you can contact Borland.- H+ z' l4 Z$ L8 L E1 q. P
- ( ]8 z. m4 Z/ B' x2 J
- ### Doing the work ###0 R! p7 J( f# x+ X. t+ |
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all7 ~2 {, B0 {4 L ^# f/ p" K& E
- the perquisites right, just open your server.ini file, and add this section at& c4 L. n( T% m% R
- the end:
1 R$ P* z. T/ s8 M - ---cut here---3 e0 q7 ?$ d2 B: i( e: J, c/ S
- [DBEXPRESS]% L8 t9 O `4 a0 e) g4 p1 t
- sqldir=mysql_sql
- D8 e9 z3 W7 v/ R; y- @1 r0 t, R - Drivername=mysql, d+ ^) K O8 j, a* v& V+ A, E6 t
- Database=Your_Database_Name_Here0 J& W3 W& v2 Y+ g1 X
- Hostname=The_PC_the_MySQL-Server_is_on" `1 Z/ N2 X6 O9 Z3 b2 @* s3 K
- User_name=User_name_on_the_MySQL-Server6 J3 n& R$ z, } z$ n; Y
- Password=Password_to_go_with_above_user_name
/ K2 P- b7 p& V2 P - GetDriverFunc=getSQLDriverMYSQL
9 J' e. L1 j" [5 ]0 K8 X - VendorLib=path_pointing_at_your_mysql_vendor_lib, N. X, ^% L3 z3 n) ?/ ?+ ^+ o. U
- LibraryName=path_to_libsqlmy_libary9 ^; m" G/ O7 d) [( `2 A
- Active=1
. @9 H; [4 \# S& b1 q - ---cut here---
5 y4 W O+ J9 z. t2 a$ U - In my environment (a linux box with a MySQL server running locally) I have:
Y1 l. z: N, r; t+ C, [ - ---example---3 G9 d/ a+ Z' {2 d
- [DBEXPRESS]
. _7 u+ v3 Y q - sqldir=mysql_sql# w$ V9 u8 n7 t) }) f4 U% g
- Drivername=mysql
6 ?) c, @# Z. y( n" i1 Z9 W - Database=test
U! y3 \+ \% D& b# Q& a - Hostname=localhost
( T1 g8 F. i% P/ [+ R9 X v4 G9 \% p5 l - User_name=testuser$ t( M; r% z( ~0 q$ Y1 O
- Password=my_password
3 w; z) [8 V! B- m3 U$ J, F - GetDriverFunc=getSQLDriverMYSQL
( \& R% K y J8 }" P( A0 T# J - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 j: u! e0 u0 k9 X$ |
- LibraryName=./libsqlmy.so+ n% c. ?; s3 C5 M
- Active=1. \9 n% [- b" |
- ---example---
% }' }0 w: S8 b& z# j* E$ W - & `" Y# G K: U, [$ l9 D
- On a windows box, also running the MySQL server locally, it would be:0 m( v* B$ x' ]& _4 e
- ---example---
. s( ~* L7 ?5 E1 L - [DBEXPRESS]
7 G" R( G3 ~7 G; ~3 L" q+ e* {( }3 L - sqldir=mysql_sql6 `- d5 Z& b8 D' G
- Drivername=mysql% d$ e3 |# ^& y. i8 _
- Database=test
7 p1 u" t( o! T1 c( A - Hostname=127.0.0.1- V$ b# T$ L! e2 o; ]
- User_name=testuser9 @' m- {% U2 v) E- Z
- Password=my_password) ?3 x3 Z% k6 o$ k
- GetDriverFunc=getSQLDriverMYSQL: ~( a. L6 `+ J: [! s7 J( n
- VendorLib=libmysql.dll6 {7 S5 D, p1 c) f* Y: }
- LibraryName=dbexpmysql.dll9 R; C. V6 O3 o& Q# O0 f
- Active=1
& q; o8 ]* z7 V" v% t - ---example----
0 d7 d. r# W! n7 m* E5 ^' Z; B - - written 02.03.04 by pwk.linuxfan
# I! ^: N2 S I' c3 }* ]& i' E - / Z0 X" X/ K' C5 E
复制代码 |
|