|
|
麻烦翻译一下,下面这段文章:xhan , `8 y; Y( _. V: Q% f( g
$ n# I- ?7 z9 |$ v# R
- 4 K w7 U( }8 m7 E8 B, S- X
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
5 P5 d% c: N1 F4 ~" m# j, o/ O4 U2 O! o - , k; a, v+ w z' `, ~
- ### What we need ###% Z% d8 @+ ^. f1 B# k: Q. x% z- h
- Naturally, we will need a MySQL server to store the data for us, this document
0 x8 y7 b+ Y# Z' @- C - will not explain how this can be done - there are documents out there for the ; { S( h6 l" M5 g& F
- interested. The requirements include a (empty) database for TeamSpeak to use
3 _- s8 P9 Q0 | - and a user account (username + password) that has the permissions to do stuff: Y# K2 \. o" P. q& }- ^- l
- with the database. Additionally, you will need a vendor library installed on the* Y2 d$ u( N$ T
- local machine, this came with my MySQL install.
* Y# f* L7 W/ c - These instructions will not tell you how you might transfer your data from the
) ^. h) S2 w: P8 n1 a7 Q1 A - SQLite database to the MySQL database, we start with a clean and empty MySQL& T' B0 i9 t8 p/ ^0 N b6 g
- database., Z+ _) F9 q' N+ }* v( L
- Some users have reported ways to import a SQLite database into MySQL, but at( i! H. A' k0 ^$ _
- the time of writing, there are still too many issues - check the current status: b& e# j( h/ `/ [9 }$ Z' M: g; P
- in the TeamSpeak forums if you are interested.4 J& T7 b$ [/ I) U7 E
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from# X2 h7 `/ G" h9 z5 _
- Borland was used. This driver can only interface with the client library that : G( p1 e4 I1 I" ]% a5 s* b- w
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this8 v0 a9 ]9 ]; f# e, @5 ~' B+ M
- client library - basically all you have to do is to use a 3.x client library as
) L' K- F; }! b3 ]) |5 @, a1 k, ~# R8 T - "VendorLib" and a 4.x database to connect to.- S9 ~/ w+ }9 `& H
- If you need more info about dbExpress, you can contact Borland.
! O a9 m* U% L1 _ - & m* z0 E- n+ G; Z: U
- ### Doing the work ###
- f5 J0 k: \1 n4 ` h/ S7 i: C - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& [0 D( W' `: G
- the perquisites right, just open your server.ini file, and add this section at
$ [! v4 a N- I - the end:( E# c+ q, L+ F
- ---cut here---
+ t, h* y( b8 o2 u- J - [DBEXPRESS]
& s( |* n0 k* S2 U - sqldir=mysql_sql
% I9 ^0 w$ u7 B4 I0 Q9 z0 P8 M - Drivername=mysql# p0 r8 `% d. w
- Database=Your_Database_Name_Here# A0 T! _! y; @6 ]) y! h
- Hostname=The_PC_the_MySQL-Server_is_on
8 d# i, D3 r7 N - User_name=User_name_on_the_MySQL-Server
9 Y0 h/ W* N, Z- B0 v+ U - Password=Password_to_go_with_above_user_name
* K3 H" d7 ~8 }3 c - GetDriverFunc=getSQLDriverMYSQL
% ]# E& f9 I! o% m4 ^8 }, x, { - VendorLib=path_pointing_at_your_mysql_vendor_lib' t0 v% G6 G7 j0 ]3 U% j8 S
- LibraryName=path_to_libsqlmy_libary
0 U6 K" O+ Y0 w* V2 @( f N# N - Active=1. }, v) N% e( O6 W" T" b; }+ u; \
- ---cut here---3 C( N; j$ ?# S; n! K$ y
- In my environment (a linux box with a MySQL server running locally) I have:7 j2 o( \& s% Z* B2 f
- ---example---
- y' s' c0 R) ]+ v; |5 C' n( O - [DBEXPRESS]& f5 A# _ j) ^0 }, P
- sqldir=mysql_sql
( V! N' \8 g" z7 M* A - Drivername=mysql
0 }) T, {7 M/ a* { - Database=test: u ^3 {: H2 ~9 K
- Hostname=localhost
2 {) R. Z7 O% ~ - User_name=testuser
/ v3 C. R* C2 d4 [% D8 {# y/ P+ X$ U - Password=my_password
+ ~0 q+ d& g; X1 {! | P7 t: X - GetDriverFunc=getSQLDriverMYSQL
& A( [- Q. z$ v- n- S6 b - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 x' t* A) Y* H* g; j2 l/ U
- LibraryName=./libsqlmy.so. ~2 J, a6 H3 |' K- w
- Active=1
7 _# \3 _' Q" T( Y# M - ---example---: i; M& V* `/ ~$ Z
- " Y7 Z) n; o! o% a
- On a windows box, also running the MySQL server locally, it would be:) d$ F5 l- y) d: d3 V% w
- ---example---) _! D! p% s4 u
- [DBEXPRESS]/ ?* k, A/ x7 V: z: Q! X: P* f
- sqldir=mysql_sql& ^2 o( Z5 y+ r! u$ }! X9 R
- Drivername=mysql
! P' J0 Y0 w- P \% n/ f - Database=test' T, {) p$ y' V2 g, C7 v2 y4 S
- Hostname=127.0.0.12 |1 z5 |0 ]6 F! m: R
- User_name=testuser
: h$ s: m, a$ x2 n - Password=my_password
) G0 @$ b( I6 g3 f - GetDriverFunc=getSQLDriverMYSQL
$ S1 M X$ K9 J - VendorLib=libmysql.dll7 G! L t' O! i! C j1 m3 G. n
- LibraryName=dbexpmysql.dll
$ u' |* v2 u+ s" Z: q+ p- G% F - Active=1
. v- e( S. J# p: k6 p - ---example----
0 K+ g+ u M- } ?$ P - - written 02.03.04 by pwk.linuxfan d$ g) z/ D7 \! @2 `
- ) {6 H. T1 k( k
复制代码 |
|