|
|
麻烦翻译一下,下面这段文章:xhan 1 t9 b C- ]( F: q7 ]$ k) H& ?6 v
& O s3 I+ l$ e. ]9 |-
& W* t! H( ^8 P8 k6 W - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 c3 x4 a8 V) F% g- O! c
- 7 K9 Y: L/ q( r9 m( y8 \# j
- ### What we need ###
: U, {5 Q0 ?1 U - Naturally, we will need a MySQL server to store the data for us, this document
& h; m1 X+ Q! o+ n4 [ - will not explain how this can be done - there are documents out there for the
: G! ~7 ~2 e x6 @ a) ^- s3 D6 }( b - interested. The requirements include a (empty) database for TeamSpeak to use/ N" K) A8 e, m; o9 ?5 T. [
- and a user account (username + password) that has the permissions to do stuff
9 s8 [" ?6 V( b$ t5 Y - with the database. Additionally, you will need a vendor library installed on the& w" F- W1 s1 [4 S' |1 S+ S
- local machine, this came with my MySQL install.' N8 h! h4 s. |5 |/ P
- These instructions will not tell you how you might transfer your data from the
. y% ?* a- m F: [$ V - SQLite database to the MySQL database, we start with a clean and empty MySQL: g+ I P/ l# ?, w% s
- database.6 @7 \, ]+ r$ q! K1 O
- Some users have reported ways to import a SQLite database into MySQL, but at
; |3 f5 Q& j4 \+ D - the time of writing, there are still too many issues - check the current status/ A7 j5 e* t& J( o
- in the TeamSpeak forums if you are interested.
* E# y& z# E% B* w4 ? - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 c% Y7 m2 C( C) e! T% D - Borland was used. This driver can only interface with the client library that 6 `4 k6 V! z7 y# \# M
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this) n& D! E# g0 t( a# N( G$ O' U& l
- client library - basically all you have to do is to use a 3.x client library as
+ F# U$ S, G- {# C% q. Q - "VendorLib" and a 4.x database to connect to.5 M& h+ v: i6 t; t+ w% a
- If you need more info about dbExpress, you can contact Borland.1 d. m5 S) Z# `4 v9 \& t
R2 e( Z& s _. v3 H- ### Doing the work ###7 w! y; D9 D' c* m+ A
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
' C6 I1 Z8 ^: i8 R2 A - the perquisites right, just open your server.ini file, and add this section at5 @# t2 y+ G& t# f1 `' Q. q5 J
- the end:6 A' D j% d, i) B$ C
- ---cut here---
, v, p. q) B. H6 s- q7 k+ U* u5 E - [DBEXPRESS]
2 E& \2 z; b4 v' g8 M7 O& s: Q - sqldir=mysql_sql
1 D6 h. W" D0 s2 t# P R - Drivername=mysql6 h4 m6 z( {2 J' b7 V5 [
- Database=Your_Database_Name_Here( M: h8 _3 w* T- I7 k
- Hostname=The_PC_the_MySQL-Server_is_on
: ~3 k3 D/ l+ A: q; \* R - User_name=User_name_on_the_MySQL-Server6 d6 g9 ^4 X2 n' c
- Password=Password_to_go_with_above_user_name
$ E7 t) J- L1 ^ - GetDriverFunc=getSQLDriverMYSQL& Z1 o" V6 T- v; x8 O* W& S8 H3 b
- VendorLib=path_pointing_at_your_mysql_vendor_lib
+ {6 t) u* p0 d: { - LibraryName=path_to_libsqlmy_libary
. B" \8 Q6 H' I# v, t+ e - Active=1$ q# m0 P8 Y3 S4 `0 h
- ---cut here---
6 a' \2 O# W# I/ }8 E% i7 \7 g' M1 t - In my environment (a linux box with a MySQL server running locally) I have:6 {' `7 R2 s5 Z% I3 S
- ---example---
6 A6 j( Y E* b/ E% ^8 J7 S - [DBEXPRESS]) C) F% O2 G2 [
- sqldir=mysql_sql
# h5 ~! _, Q3 \) w5 p' q! g - Drivername=mysql
* b8 M4 ]' ?+ A! y0 n - Database=test
( G5 z- E3 L/ r - Hostname=localhost* k/ B n2 N6 X. i! T
- User_name=testuser& P! F4 ]' y* p! n9 w
- Password=my_password
9 m7 N9 G* ~ S6 O( { - GetDriverFunc=getSQLDriverMYSQL
7 W$ l: [# {9 u, ]5 c - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* W: M/ ?% _( g' Z H
- LibraryName=./libsqlmy.so
& y0 z- H, g4 w, O( o1 g - Active=15 S% C D0 @4 @
- ---example---/ o3 z7 p7 z$ L' l( ]
- K4 W% h k' U" i. H2 [6 M+ d8 ~' v9 U- On a windows box, also running the MySQL server locally, it would be:
3 B* q5 O" X& }3 s - ---example---% [3 I6 m E0 |; z
- [DBEXPRESS]& \2 E- ]0 D9 W* t
- sqldir=mysql_sql
& n% z: n2 q- K5 G! X - Drivername=mysql$ |" C9 m( T; t+ ~% s
- Database=test
, E& a. `: S4 g - Hostname=127.0.0.1* c: _; s" ], m4 P9 a. f7 f
- User_name=testuser; a4 b( u2 K' @
- Password=my_password3 H- Z$ G* y! X& }2 q
- GetDriverFunc=getSQLDriverMYSQL, T' x; Y" U$ x! b# T8 m5 C
- VendorLib=libmysql.dll! i0 r* \/ `2 a/ T0 \, f7 R7 G: S
- LibraryName=dbexpmysql.dll: B; P6 b8 i# F! o
- Active=1
; F6 w% |" j) A - ---example----( A w/ K4 Z9 W! m& `
- - written 02.03.04 by pwk.linuxfan5 A% G& ? r) m; a
. k3 t; o$ [: [2 A' y7 o
复制代码 |
|