|
|
麻烦翻译一下,下面这段文章:xhan ; e2 s. }' {8 t- O6 J
' C+ W$ H+ ?4 J) {
- , R. U2 n6 Z: k$ i+ f
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######7 E6 x2 f, K; e9 J* l
- ! Y! u5 q7 K! A" t8 o
- ### What we need ###$ N1 |4 h4 v4 p8 m3 Y/ u9 R
- Naturally, we will need a MySQL server to store the data for us, this document
8 i& t: @/ V6 I2 N& U# S8 z - will not explain how this can be done - there are documents out there for the
( ^$ k) A: P0 V - interested. The requirements include a (empty) database for TeamSpeak to use+ _ Y9 u" A, w! M. k% w
- and a user account (username + password) that has the permissions to do stuff
5 q, L. M) o3 t c. o - with the database. Additionally, you will need a vendor library installed on the6 `- s7 C* R7 L* c
- local machine, this came with my MySQL install." A0 z! Z+ a7 z' v9 D. g
- These instructions will not tell you how you might transfer your data from the. n6 _8 o/ a, s2 N, A4 g
- SQLite database to the MySQL database, we start with a clean and empty MySQL2 G1 a, e1 G6 b) Y# i0 L
- database.& e1 G1 Y) j2 d- E$ b* p# `
- Some users have reported ways to import a SQLite database into MySQL, but at& \5 p. f6 E* b0 [0 l' @" h: H, L
- the time of writing, there are still too many issues - check the current status/ b1 f; U/ t1 x W: a' c/ O' \
- in the TeamSpeak forums if you are interested.
" F/ k. S5 L9 K* T - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
6 C# }: ^ o# r* W - Borland was used. This driver can only interface with the client library that
# j; U' B4 W9 r5 e( f - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
/ j& k1 q+ H% [6 }1 ^* ]! Z% H8 O; S - client library - basically all you have to do is to use a 3.x client library as - v3 F! V* j! {! } { ]
- "VendorLib" and a 4.x database to connect to.3 q5 g& M) w8 y5 n" k& w
- If you need more info about dbExpress, you can contact Borland.
4 @3 q: d8 F6 F - 6 t2 S7 A6 N `
- ### Doing the work #### {2 q' T6 g; x: `& l6 b
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
# g3 G; c# X* `$ N9 e- t) F+ Z - the perquisites right, just open your server.ini file, and add this section at" o! I# g; b6 e% w
- the end: m, R2 ^( U) Z% X8 J6 w
- ---cut here---7 l) k5 e% ]0 T
- [DBEXPRESS]2 D- j' s |3 k2 A+ ~: }# w
- sqldir=mysql_sql
# o9 \9 t! G/ J7 a/ a }; D# X2 u - Drivername=mysql! O5 c" ~% \$ H
- Database=Your_Database_Name_Here1 C8 \" _ t4 N
- Hostname=The_PC_the_MySQL-Server_is_on% J, L( o# W7 Z/ P- X5 m, J; _: |
- User_name=User_name_on_the_MySQL-Server5 [: O3 z! J; J1 G6 k- I) t1 H2 ]
- Password=Password_to_go_with_above_user_name- F- K) B+ P- ]& B7 b3 m* |2 T
- GetDriverFunc=getSQLDriverMYSQL/ U }7 d# V6 l: S0 v! ?
- VendorLib=path_pointing_at_your_mysql_vendor_lib6 l0 o8 M2 R @3 O @! T+ k- v
- LibraryName=path_to_libsqlmy_libary
) ] x- p! k/ R Y" }3 d6 i: t% ^ - Active=1
& M" y- N* A+ N3 @6 O' w8 g - ---cut here---
0 x. L3 Q9 {) W3 j - In my environment (a linux box with a MySQL server running locally) I have: x- ^' s, O0 A
- ---example---, F/ u8 {& ~1 y+ Q
- [DBEXPRESS]
# p) {( Z0 W7 j6 j$ P' d! M - sqldir=mysql_sql
& v: p. P' n4 M2 e - Drivername=mysql
2 {2 v# \8 D4 t" H: `8 a0 R - Database=test
) m h7 [) E4 R! b* C2 Y* [ - Hostname=localhost0 D! r& D- }% A2 V5 J- k/ S# ~
- User_name=testuser% Y( A( N4 |1 R; N$ b
- Password=my_password% W6 `1 y3 T& a9 d" W9 u$ Q1 D
- GetDriverFunc=getSQLDriverMYSQL( E9 ^4 ^: u; V7 K/ n) U
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
+ i8 f5 t$ {6 x! l# z - LibraryName=./libsqlmy.so$ I6 @: W/ H4 B; I: e$ C/ |% [
- Active=1
8 ?- S3 F# M! g" A! { - ---example---
- x: W$ I4 W! Q
& m3 s f7 i0 F! y- On a windows box, also running the MySQL server locally, it would be:( r% C# K& f( p8 s0 N& m z' v
- ---example---
/ L" t- @ [9 T# u - [DBEXPRESS]
! }; ^( ?2 a$ N# Y9 M - sqldir=mysql_sql
3 y' M' \* Q7 o8 h - Drivername=mysql2 F) h& r& ]/ |0 T
- Database=test, g2 L6 ^ v7 _0 r3 i1 Z1 w
- Hostname=127.0.0.1
6 ^( W$ y9 c! m" c - User_name=testuser
# x) N0 L3 I7 m' {$ H - Password=my_password( X% ` b/ ^1 P! C4 ~. K
- GetDriverFunc=getSQLDriverMYSQL+ \) K/ L# Y6 [# E" k; F V. `4 l
- VendorLib=libmysql.dll5 A4 L1 s6 f1 ?
- LibraryName=dbexpmysql.dll4 M: D, u, K+ y* J" x7 p$ n
- Active=1
2 N. Z# |# e! \2 c5 D2 J% w - ---example----* y3 f! t, w; U& U. C7 W
- - written 02.03.04 by pwk.linuxfan/ i' D4 w/ q4 R% j2 b
4 t4 k7 B5 ~% E) R+ t! L- P5 h
复制代码 |
|