|
|
麻烦翻译一下,下面这段文章:xhan
' e5 d* a$ a; \1 [+ L t
3 Z8 ~, T1 R8 H- ' \$ j0 H! R9 \( w+ y- S- \
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
1 N6 l5 `3 ^2 P - 7 O I1 U0 G$ s8 Y; V& K3 V& |
- ### What we need ###/ ~3 w& B/ D* {
- Naturally, we will need a MySQL server to store the data for us, this document 5 V4 Z O: ^5 U7 l
- will not explain how this can be done - there are documents out there for the
) w' b9 M2 W8 _: s Y - interested. The requirements include a (empty) database for TeamSpeak to use
; a( k; D8 z4 } - and a user account (username + password) that has the permissions to do stuff( W- j- [% G& r# s. a1 T
- with the database. Additionally, you will need a vendor library installed on the; U- d3 @& i2 q1 r } v
- local machine, this came with my MySQL install.+ {9 j( J# T0 o# _, \
- These instructions will not tell you how you might transfer your data from the u$ E" l1 ]3 y5 I* x# J) J
- SQLite database to the MySQL database, we start with a clean and empty MySQL* D# g4 N3 t$ q4 s' u
- database.+ x- K$ c; }- }: ~
- Some users have reported ways to import a SQLite database into MySQL, but at
1 q" K9 h, M/ [ - the time of writing, there are still too many issues - check the current status
+ [* o* N' d, T. \ - in the TeamSpeak forums if you are interested.
9 j5 T) p% i# S) e$ E6 o - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
9 h: z+ T* R0 d4 P; |# d& Y- l9 l - Borland was used. This driver can only interface with the client library that 8 K: m' V9 h* @
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this; ~/ [3 M% p8 u1 `% W
- client library - basically all you have to do is to use a 3.x client library as
2 y7 U; x1 w8 R% J - "VendorLib" and a 4.x database to connect to.
$ i7 E4 ^- p1 K& w, D( i - If you need more info about dbExpress, you can contact Borland.2 y% I& t1 T' Z( `
8 O6 Y9 t' y3 R/ a- ### Doing the work ###9 _; I' R# v1 b; [' g
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all5 X7 G! C) I* ~6 k" }0 k# P
- the perquisites right, just open your server.ini file, and add this section at: G/ K( C4 @1 V" Q% b5 p
- the end: i6 N2 y- _- U' c- D) \( `4 H
- ---cut here---
! q% Z9 P2 I& C' l& A1 ? - [DBEXPRESS]2 O# `; c0 X, i# x. j; B+ j
- sqldir=mysql_sql
; K+ d9 O& D3 p0 g1 a2 n( i - Drivername=mysql
' N$ T5 M0 F1 k k - Database=Your_Database_Name_Here- ^* C5 j* e: _& X9 ~
- Hostname=The_PC_the_MySQL-Server_is_on8 q/ D k8 a1 b5 J \
- User_name=User_name_on_the_MySQL-Server# X1 p3 ^0 W+ b5 j5 p
- Password=Password_to_go_with_above_user_name
4 D2 d6 B! }* s+ F - GetDriverFunc=getSQLDriverMYSQL
/ F! J# M7 G1 a; ~$ _ t - VendorLib=path_pointing_at_your_mysql_vendor_lib+ i* p2 _2 ]$ X& U4 Q% @
- LibraryName=path_to_libsqlmy_libary( b: L0 v3 H! m ]! p% e
- Active=15 a+ A& n( o2 J9 M. |: |
- ---cut here---1 f9 }8 H9 B) o& w1 [6 e
- In my environment (a linux box with a MySQL server running locally) I have:' m# N5 B( {! Z. s k
- ---example---
5 K, \5 M! l# C7 m - [DBEXPRESS]% p5 b. ^# W( ?: D3 h: P! V, y5 @
- sqldir=mysql_sql" @8 V2 y2 Y4 r/ {; ~' w
- Drivername=mysql
- ~* e& b: F1 f: g - Database=test' o% o4 c/ Q5 z Z
- Hostname=localhost
! K" w& p# \3 ~2 P$ q: ?, K1 j) k - User_name=testuser
/ \- `! w+ `$ {; k3 d - Password=my_password) C; L7 v+ u! a: g' }+ k, n
- GetDriverFunc=getSQLDriverMYSQL8 u- A1 Z8 T1 k% U3 z) c1 P
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0, i) G% ^1 ^! ^5 \" h. \: f" l+ q9 t
- LibraryName=./libsqlmy.so H, l ~/ D- |' e" o, i! Y
- Active=1
' K/ U- h+ D9 {6 T% `" ~$ z& R1 ?5 W - ---example---
' c& Z% Y4 n. I( _1 k' o' } - " F& g$ X0 n" ?6 o3 K( y
- On a windows box, also running the MySQL server locally, it would be:
# K# u9 ~+ F4 E' v8 ]& o8 t- M - ---example---& O a4 k# ?. e$ _4 {$ A
- [DBEXPRESS]
/ c* ^( x- [/ S6 x - sqldir=mysql_sql7 B; R' ? V" j
- Drivername=mysql
5 P" I0 Q- ^% @1 a; A/ y - Database=test
, ~4 x5 v" Z2 [8 k' g - Hostname=127.0.0.1: d4 g5 o& A$ D4 g) M# j. W. [% t# b
- User_name=testuser
3 n% Q Y, R/ b# A# H - Password=my_password* f l( w( f- M* X2 r- _! e E5 V
- GetDriverFunc=getSQLDriverMYSQL5 c( m/ C$ |. j
- VendorLib=libmysql.dll
2 R5 ]- u1 h$ f& J$ P. w4 \7 `7 a5 K - LibraryName=dbexpmysql.dll9 U) j# ]3 ^+ W. U3 W
- Active=1# V2 }5 o/ V. R5 l
- ---example----: z$ f, A% W% X4 I$ i
- - written 02.03.04 by pwk.linuxfan
L/ Q' M/ q$ \4 B9 u) L5 R, r! V& J
: ^( N; i+ {" \. p
复制代码 |
|