|
|
麻烦翻译一下,下面这段文章:xhan - H; \8 E v/ @; C
) |) z- S: b% y7 O# G- i
-
g0 O0 ?! ]0 V" E" ?* I+ g - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
3 u9 Q" l0 c- ] - 1 y4 M" ?3 Z' {. |0 Y# J
- ### What we need ###
7 H, U' x2 f8 N2 V4 R* `8 O - Naturally, we will need a MySQL server to store the data for us, this document
( B9 Z( k7 u+ b6 P& K- W - will not explain how this can be done - there are documents out there for the
: K; I, q1 ?+ _ P - interested. The requirements include a (empty) database for TeamSpeak to use0 t2 p. V+ V* f; s4 J2 }
- and a user account (username + password) that has the permissions to do stuff; \) ^; y5 W/ G
- with the database. Additionally, you will need a vendor library installed on the
) r; T% ?. P0 L/ w. s8 q. C# a( |: u - local machine, this came with my MySQL install.
K( q: Q3 c+ j" Q6 `* L, R - These instructions will not tell you how you might transfer your data from the
4 |( g2 g' M* y" x- N - SQLite database to the MySQL database, we start with a clean and empty MySQL
, a3 f5 t& [" G1 _6 j3 n - database.& B; p/ ^! `1 D2 y
- Some users have reported ways to import a SQLite database into MySQL, but at
6 M. Q2 x+ T7 I; q - the time of writing, there are still too many issues - check the current status" B0 B. |8 w0 w) h
- in the TeamSpeak forums if you are interested.
7 | a- F" r) j: i- o - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 a- v/ [4 }4 R; C/ J' d - Borland was used. This driver can only interface with the client library that
: [4 @' H' y% X - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. ~* B( v+ O7 d$ p7 h8 v: u - client library - basically all you have to do is to use a 3.x client library as
% ^0 R6 N. {. o) d - "VendorLib" and a 4.x database to connect to.% E( ?' m2 T. q; A1 E
- If you need more info about dbExpress, you can contact Borland.8 S% e: s0 s9 N7 E7 ]2 z# }
- " U! w5 ?. ~6 W0 y0 Y: f/ m
- ### Doing the work ###$ I1 |; `4 h+ H$ |) k7 f8 T
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
U; U' a" U+ t" M - the perquisites right, just open your server.ini file, and add this section at
, c1 X4 P g; d6 z$ X4 T - the end:- g2 ?: r/ `: |. x6 G- q9 r$ I/ i! J
- ---cut here---
+ q- o! Q7 A. R3 L- z1 g& u0 x0 P - [DBEXPRESS]
4 B6 O6 \/ |! z" o - sqldir=mysql_sql
# t4 y4 A# l, K& ~4 ^* @ - Drivername=mysql+ ?+ O/ p% I- F8 E# X3 R$ `
- Database=Your_Database_Name_Here3 `+ j6 D" i. X7 s8 v8 T1 M4 [
- Hostname=The_PC_the_MySQL-Server_is_on3 g7 b; z/ C }
- User_name=User_name_on_the_MySQL-Server
! h6 ]' m. a' |5 x j - Password=Password_to_go_with_above_user_name
" R" D8 d) i0 T) @7 T5 P H - GetDriverFunc=getSQLDriverMYSQL5 ^& S* n8 t5 f" z
- VendorLib=path_pointing_at_your_mysql_vendor_lib
. k2 F6 @7 j q+ J9 p8 n+ U; a - LibraryName=path_to_libsqlmy_libary
; U w" b9 D3 L' D - Active=1
) O* c5 N, t9 B - ---cut here---# O* K: q5 @* j8 V
- In my environment (a linux box with a MySQL server running locally) I have:
3 Y- }2 X! \1 o# C5 S - ---example---
" n( z9 |1 t/ r" H8 D d9 R* t - [DBEXPRESS]; {9 m9 X4 p! {
- sqldir=mysql_sql
% d% V9 |+ U( ?3 r5 Q0 x( k+ _6 _ - Drivername=mysql
* n9 c* l8 h* i5 L - Database=test5 T; g% Z% h+ k) t o
- Hostname=localhost* X2 {2 `" g& K% Y
- User_name=testuser
: t0 J, J! v {0 C0 v1 V; a8 Y - Password=my_password
7 P2 k! Q" |! O; O D/ q u - GetDriverFunc=getSQLDriverMYSQL& q8 F; I/ U+ V7 R; W. I% Y2 ?
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
* J& {3 V0 d5 J% f - LibraryName=./libsqlmy.so: M& K) \" ?; Y
- Active=1
. B! N6 k) O& g) _+ V$ ?% j% m, g - ---example---
3 |& D. a" J! N) g! R, P& r8 R - ! p/ g& C( d5 @1 L" @; `
- On a windows box, also running the MySQL server locally, it would be:; f6 |- R+ m$ t) M6 y
- ---example---$ Q5 ?, v) ?3 n6 M% c
- [DBEXPRESS]
4 O4 d# H6 \) C3 t8 k( T1 M* ]' T) } - sqldir=mysql_sql( u9 `' i; {- {9 E5 ^% x- {- o
- Drivername=mysql5 i. Z/ ^* |) e/ K& C
- Database=test
. a! Z3 @& g# v' f5 |5 r. _ - Hostname=127.0.0.1
* K3 ]8 n" M1 x9 |; L6 W - User_name=testuser9 X/ _" p, T) x# ?
- Password=my_password, e: N5 ?# X6 q2 U2 U. r4 }0 I T
- GetDriverFunc=getSQLDriverMYSQL
4 G: N3 F% ^! O - VendorLib=libmysql.dll
( N e! C( J! N! o% v w* | f - LibraryName=dbexpmysql.dll, t, K8 B9 Z% \
- Active=1( g" L, t: O. b$ Q* H5 ?5 h. L
- ---example----
9 t& n# n( P7 n/ m - - written 02.03.04 by pwk.linuxfan' R% B* V1 E5 ?, M, v4 U# S6 Y
: k% ]$ k& s1 ^) q6 x: y% s- j
复制代码 |
|