|
|
麻烦翻译一下,下面这段文章:xhan % n4 {+ |# f4 ]6 S8 s$ l
& _& ^7 ? l" E5 j0 D
- ]+ G5 t- n4 E' B% K% g+ }
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
) y& Q J7 z$ A5 [/ E
7 ^' ^8 T3 r8 d% @% ^% e! ~# N1 }- ### What we need ###
# I4 g, x/ d# N9 t - Naturally, we will need a MySQL server to store the data for us, this document
+ _6 [- d% b3 N7 y: g0 [8 X& Q - will not explain how this can be done - there are documents out there for the , W* B3 B5 ~4 _9 h
- interested. The requirements include a (empty) database for TeamSpeak to use
* i8 p' m- I/ `' ~7 A( X$ j - and a user account (username + password) that has the permissions to do stuff1 S- r1 J6 ?- ?
- with the database. Additionally, you will need a vendor library installed on the
! p9 a5 \/ \0 {" x) Q - local machine, this came with my MySQL install.( v( P( a5 ], J8 ?6 X
- These instructions will not tell you how you might transfer your data from the
/ z; d/ E/ h/ i, W. k6 P, K2 _ - SQLite database to the MySQL database, we start with a clean and empty MySQL! X$ J& S# r+ U3 W
- database.
4 H6 J( N8 J4 K( \; E - Some users have reported ways to import a SQLite database into MySQL, but at; {; q. Z! Z) I0 o
- the time of writing, there are still too many issues - check the current status
. C% U* T# X$ \1 j& ^ - in the TeamSpeak forums if you are interested." m. T' {& J5 V
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from/ W" [# x! @# Q8 v6 j0 J4 ^
- Borland was used. This driver can only interface with the client library that ( b+ I0 r8 l4 s2 n
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
, R( W' e! M; f6 K, n+ ~* a - client library - basically all you have to do is to use a 3.x client library as * i$ c( H/ h3 y% h; s
- "VendorLib" and a 4.x database to connect to.) G5 }" S }5 u- o
- If you need more info about dbExpress, you can contact Borland.' Q* s; P* y2 w, C3 K
9 g1 @! T6 ], H! t8 ~4 c- ### Doing the work ###% V5 q3 e: O/ G! E) p3 [
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 y6 [% U8 X2 V7 Y& A - the perquisites right, just open your server.ini file, and add this section at5 t! v* E) E; D$ Z& K( N
- the end:
& a5 _" P) a1 c1 r# F2 ]1 K' W, B - ---cut here---
3 y6 O. i7 e# w - [DBEXPRESS]9 v: \4 r0 I4 o* \7 d7 v5 ~
- sqldir=mysql_sql* w" q: _+ J$ ^( m4 l. w, o4 n
- Drivername=mysql
0 @+ O: S* W& h6 U - Database=Your_Database_Name_Here) z1 b: _8 L: A& N; e% v$ o4 R
- Hostname=The_PC_the_MySQL-Server_is_on0 Q7 b4 G5 L( J1 F
- User_name=User_name_on_the_MySQL-Server$ j. c% K& j4 O
- Password=Password_to_go_with_above_user_name$ l$ K& u. ~& y- Y% n9 H6 o0 ?
- GetDriverFunc=getSQLDriverMYSQL
) v: [, S$ q- b+ K8 |; m$ L - VendorLib=path_pointing_at_your_mysql_vendor_lib
. ^ E+ \4 I* a( _6 K* d" N' L - LibraryName=path_to_libsqlmy_libary/ e9 M4 t% @0 h: p, j8 X
- Active=1
. }1 N& b2 H; y- H2 u - ---cut here---! _) H; @& ]$ r7 E4 d, o
- In my environment (a linux box with a MySQL server running locally) I have:
: x0 [' j# b1 |9 d* o) `1 S - ---example---1 f# N d O6 z$ I8 E7 u/ T V
- [DBEXPRESS]7 d0 k. z4 a' [( E3 {+ M6 c
- sqldir=mysql_sql! z9 B, {/ C7 m2 w% ^; W
- Drivername=mysql: m( ^( d1 y- ]- \( J# P& Y
- Database=test
& B# `( J; a+ W; h% [ - Hostname=localhost% |9 p# I, D$ s0 _
- User_name=testuser
+ z& R- w$ Q' ]; b - Password=my_password: ?, y; T7 z/ J
- GetDriverFunc=getSQLDriverMYSQL
# O6 G( v" O8 [/ ]. x9 c - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
# K% G+ u: [' ?. R& e - LibraryName=./libsqlmy.so# W# q. [& a4 h+ j
- Active=1. i$ g5 N9 N% }$ U- q
- ---example---' k3 I9 C/ C1 f
% k9 O3 d1 F3 R- On a windows box, also running the MySQL server locally, it would be:# s. A2 }" |0 @! i
- ---example---5 }. ^+ F }. a2 G5 [% e% \
- [DBEXPRESS]4 K( Y, g+ u. x# x$ ~8 I
- sqldir=mysql_sql
( f! j/ e6 J! W - Drivername=mysql
( K) k: |3 a% d - Database=test6 B2 y: S% N) Y: o" x
- Hostname=127.0.0.1; h' k9 ?" c& P! L9 i
- User_name=testuser7 H- v. ?) D1 {: V5 Q! z9 W! B+ e
- Password=my_password0 U8 h* V3 M. t5 ?: [# l( H. F2 Y$ @. a
- GetDriverFunc=getSQLDriverMYSQL
. s& E+ F# c- k5 O- K9 n+ M. O - VendorLib=libmysql.dll# v8 O& _1 S5 ?8 R" \- u
- LibraryName=dbexpmysql.dll
, N# J# M% y2 [2 Y( w( H+ c - Active=1: f/ d% I. i3 ^$ N$ h; l1 i
- ---example----
. y$ H7 ?# K w1 l - - written 02.03.04 by pwk.linuxfan1 i! _. v& j" A1 g
. i" \' y+ @% G' h9 b+ p
复制代码 |
|