|
|
麻烦翻译一下,下面这段文章:xhan * ^0 N1 [& l$ @6 d5 K2 e- M
+ o. l: s6 G" n) C& h# l1 w# G- ( w4 Q' z* g% s- Y
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 C0 r2 x. g, c2 W9 r* q- s
- ! s ?3 j& s" ^$ M; k$ x
- ### What we need ###
$ _ y7 r- }% z, |; t' e( v - Naturally, we will need a MySQL server to store the data for us, this document - w+ |. i. B0 p# A# e: ~, [' p
- will not explain how this can be done - there are documents out there for the
8 M/ ^2 j: K2 o! \" m/ x9 q - interested. The requirements include a (empty) database for TeamSpeak to use% [! X3 f% M3 x# C) ]9 A
- and a user account (username + password) that has the permissions to do stuff2 h4 c8 `! l5 y/ C
- with the database. Additionally, you will need a vendor library installed on the
3 v0 S' c A' |- f/ S1 @: c - local machine, this came with my MySQL install.7 f5 `8 ?( C5 Z) G" q3 U
- These instructions will not tell you how you might transfer your data from the
$ Y) Q/ O2 e% N/ {' [ - SQLite database to the MySQL database, we start with a clean and empty MySQL! e' [2 N' s7 @% x
- database.' p9 S5 W' G5 u( L
- Some users have reported ways to import a SQLite database into MySQL, but at
; A) V" i4 `, I/ t, e/ O - the time of writing, there are still too many issues - check the current status
9 U# t; W: w+ C- O+ T% N( g+ F - in the TeamSpeak forums if you are interested.6 n- T/ G0 _1 k+ B; h3 }2 l- O
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from, w" r$ v7 B; L. J, t" s4 i" t
- Borland was used. This driver can only interface with the client library that % P8 l' w: O$ O2 I' R9 \% i
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this4 z$ b2 F. o) g5 Y
- client library - basically all you have to do is to use a 3.x client library as
8 i) S5 z; [4 z5 d - "VendorLib" and a 4.x database to connect to.
4 c# K. y3 F3 C4 r( Y - If you need more info about dbExpress, you can contact Borland.
# W0 O0 u3 g* Z4 c% L, ]; G - 1 K# p7 _. U1 L! n
- ### Doing the work ###5 a$ {. U- W+ ~
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all" x/ f' }' d2 \$ k- I$ M" H
- the perquisites right, just open your server.ini file, and add this section at3 B- c0 x+ I" d8 b$ p/ G' n
- the end:
, V$ F; f( N: o - ---cut here---6 Y+ Z j0 ]4 G* Q, z
- [DBEXPRESS]
0 }& r% A+ a3 J1 A T - sqldir=mysql_sql
; S+ H5 f$ a) j5 c - Drivername=mysql }1 M4 G+ E8 y: t- e4 e' v/ p1 E
- Database=Your_Database_Name_Here
& V4 c! A% n u9 N& C# Z$ a - Hostname=The_PC_the_MySQL-Server_is_on* i1 }0 \0 _& I/ y o" ^% I; b
- User_name=User_name_on_the_MySQL-Server& L3 o, Q2 n: X5 A9 E
- Password=Password_to_go_with_above_user_name
0 t5 _! u8 X3 T( U- W( N4 h - GetDriverFunc=getSQLDriverMYSQL
" I/ a0 N% ^1 v2 V: _ m& Q - VendorLib=path_pointing_at_your_mysql_vendor_lib9 R; M& ~1 b( P. n" [
- LibraryName=path_to_libsqlmy_libary p2 t( _9 X# g4 o9 a% M
- Active=1 O4 x4 G9 J' ^" G
- ---cut here---
, O* | ^1 [7 {9 S. Y6 N' P$ F - In my environment (a linux box with a MySQL server running locally) I have:
7 v6 ]0 h/ z3 ^- O! V( `4 e& h - ---example---
) Q e* k% P" M. k' k9 l - [DBEXPRESS]. _) P T+ \! B+ ]0 r6 H ~
- sqldir=mysql_sql
' [: h1 G) n: k' Z/ J1 ~ - Drivername=mysql
& y. Y+ N R9 y# X; Y - Database=test
+ O" M; `9 v% U; E( {" q( G - Hostname=localhost
( y, k. t" H8 l) O - User_name=testuser
1 `1 v1 I0 I5 T" h+ J - Password=my_password, T( x9 B. ?7 j- P; S
- GetDriverFunc=getSQLDriverMYSQL% q/ K* E( ]; a
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
3 u3 l' i" D- W8 V/ R" M - LibraryName=./libsqlmy.so
- E3 O$ t+ _) f8 g - Active=1" _+ g ~- `: l2 y- M7 b
- ---example--- u7 H) O P# o) W9 _
6 ~7 i6 S2 ]8 x' r/ U; R: D) J- On a windows box, also running the MySQL server locally, it would be:/ j B' w3 w% |3 a$ Q
- ---example---
% |, `9 G8 y, O, O( ^" @ - [DBEXPRESS]$ w6 e. g) V; E5 c( T i2 U
- sqldir=mysql_sql
5 Q7 `( M$ `. Z) e - Drivername=mysql
/ r0 m- P% S" Y! d+ k1 R - Database=test
/ h. a6 R9 _* h% Y, r/ @ - Hostname=127.0.0.1
% @* Y3 U6 X" N' h J& @. O' i - User_name=testuser0 w6 X8 k3 c" _: U* l) o( A
- Password=my_password1 x Q1 Z8 i; U$ N# b1 q) ]% T
- GetDriverFunc=getSQLDriverMYSQL
1 a, U) Q" R4 |: T' a - VendorLib=libmysql.dll
3 m: |, {$ F# ]: P! }' P - LibraryName=dbexpmysql.dll
& L2 q: q8 D1 x t5 n& b8 _ - Active=1& P s+ M8 T* r2 ^8 `0 @
- ---example----
5 j: ~' _6 O7 h( o* l7 e - - written 02.03.04 by pwk.linuxfan! k# U; ^0 C* }3 s! Z
- 2 M, m# b# Z, [& h7 [/ |/ H
复制代码 |
|