|
|
麻烦翻译一下,下面这段文章:xhan $ o9 v( C2 u5 u5 _ h7 _' O' ^& X
: B6 j3 u& ~8 u j0 U3 U
- * [& J' T, F5 }- x. X# `6 o$ P
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
% Q$ X* i% d0 p0 p7 l
+ `2 \0 B& H/ g- ### What we need ###
+ L. L* g0 p" a# y8 d) F - Naturally, we will need a MySQL server to store the data for us, this document
: I$ B* ~5 e! |7 B- N# f - will not explain how this can be done - there are documents out there for the $ T v4 f* _2 N" h! N# `3 R) D
- interested. The requirements include a (empty) database for TeamSpeak to use
0 Q. [) M% `6 ~/ s- J# p - and a user account (username + password) that has the permissions to do stuff7 X! |/ l5 _0 v& p9 P4 S! W
- with the database. Additionally, you will need a vendor library installed on the% N7 ^6 b- O- ]6 \3 t& [
- local machine, this came with my MySQL install.
8 g1 U" o6 F% @% C5 t3 Z% C - These instructions will not tell you how you might transfer your data from the
: Q: j c; H9 }6 ?# h* j6 } - SQLite database to the MySQL database, we start with a clean and empty MySQL! o1 b" {. |( f B5 e, l7 E
- database.
d1 R6 G/ ^9 `* s* T' L - Some users have reported ways to import a SQLite database into MySQL, but at
: w+ b% [ F: }5 d - the time of writing, there are still too many issues - check the current status
: A$ U0 }) E( w- @6 P - in the TeamSpeak forums if you are interested.
- V2 z+ ?# t- X+ { - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
" h* \8 P. Y' t+ t - Borland was used. This driver can only interface with the client library that
1 W/ h/ Q5 c6 I0 a5 g - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" k5 D. {- M; r
- client library - basically all you have to do is to use a 3.x client library as
9 c4 J/ {& F5 g2 r1 S - "VendorLib" and a 4.x database to connect to.+ n. ?4 ~4 ~% b
- If you need more info about dbExpress, you can contact Borland.
) ?* y- o0 J1 @# r2 I0 t
2 Q0 [' o. i1 @* x+ `- ### Doing the work ###
: o+ j) V# z S' q7 b4 [ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all6 s8 f2 l1 e8 o& w) W3 N6 b8 d6 `+ V
- the perquisites right, just open your server.ini file, and add this section at
; F4 E9 e/ t: M# Y! A: u - the end:% N0 o5 A5 f7 }" ^, m9 C
- ---cut here---0 `2 \7 r3 U$ |# z0 f+ y
- [DBEXPRESS]
+ Q! r& n. x" N2 L$ O8 G7 o3 E3 k - sqldir=mysql_sql" U7 c M; P! g0 D8 G8 A
- Drivername=mysql
7 ]2 I$ W6 X( a& e ^8 M- k5 T - Database=Your_Database_Name_Here
2 L- m, q1 S& h4 r - Hostname=The_PC_the_MySQL-Server_is_on
/ Y5 x* p, O2 o& M/ W- g/ d$ ] - User_name=User_name_on_the_MySQL-Server' r% Y9 N$ ~$ G8 ]" N
- Password=Password_to_go_with_above_user_name! e1 g3 P3 R$ A3 {' V* z, g {
- GetDriverFunc=getSQLDriverMYSQL
+ `/ ^3 G$ Y; Z4 c9 i - VendorLib=path_pointing_at_your_mysql_vendor_lib
* [# U! V0 x8 J. ~7 J; k - LibraryName=path_to_libsqlmy_libary
( N5 e& N; _) Z3 _5 D' x - Active=1
/ O B& k- C2 n - ---cut here---' p& z9 H' y) R5 d
- In my environment (a linux box with a MySQL server running locally) I have:
) [2 I! l" H. Z3 f3 G% C, t; s - ---example---
3 d% C: V- b6 \ - [DBEXPRESS]8 x6 @5 [0 m) j( X: Q7 l/ k9 y
- sqldir=mysql_sql- N$ M. B) a& @( ~- s; \
- Drivername=mysql; j8 `* p' G) m% u
- Database=test
( P6 g. z8 r+ i5 b# @, e5 Y - Hostname=localhost" Z& w, r* `+ p' }" d
- User_name=testuser8 t4 n6 R3 R K
- Password=my_password0 k3 u# `* L2 |3 R3 d
- GetDriverFunc=getSQLDriverMYSQL
* l9 B) i! g/ K$ {, i - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
" e6 H$ J4 k X6 L8 h- v - LibraryName=./libsqlmy.so# ]* d( h% V4 l6 g
- Active=1: O. T/ U! b5 m6 Q* C( I( ^
- ---example--- `+ o( n$ H% e1 O
- 5 J3 \: n! v8 a5 X
- On a windows box, also running the MySQL server locally, it would be:% b1 ]0 x% Z, l6 @+ `0 j
- ---example---; E6 }3 P) w3 |5 ^& b
- [DBEXPRESS]
, r' s- V2 ?& _" @: p( B7 g - sqldir=mysql_sql
6 @8 J# ~6 A, g - Drivername=mysql
" Z3 S3 o7 H8 u$ m; I - Database=test( f% H9 P G) F( g/ s b- D
- Hostname=127.0.0.1
8 l/ b% o0 \4 a' [8 [, X" P - User_name=testuser5 k5 Y9 G0 K9 ~/ G% s" {
- Password=my_password% X+ K& j \& d6 b1 ?& N/ ?
- GetDriverFunc=getSQLDriverMYSQL
- y4 d0 R% e# Y; z2 |' z- p - VendorLib=libmysql.dll7 j g+ ?' R' P( N
- LibraryName=dbexpmysql.dll6 w8 [: C7 H- P0 W- O4 e7 y
- Active=1
& Y" C f0 J1 a9 o8 N - ---example---- n7 ^% R6 }, S9 F. m
- - written 02.03.04 by pwk.linuxfan0 `* d1 q6 }* t3 u, _$ U
- $ v D5 }" j; W1 j6 B& }0 w& y
复制代码 |
|