|
|
麻烦翻译一下,下面这段文章:xhan $ E, ]9 A. Q+ Z8 W$ s
5 X3 Y' r, A; \+ q+ h# w- 5 J4 g& H* U! q2 s7 }4 k# m
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######) h8 N. x" B# N4 Q
+ m4 K ]: e% l) b# V- ### What we need ###: K: Q. V" W, ~
- Naturally, we will need a MySQL server to store the data for us, this document ( \$ b6 E& C3 x' h d: j7 V0 a
- will not explain how this can be done - there are documents out there for the % m" w- O8 g: O- y/ n
- interested. The requirements include a (empty) database for TeamSpeak to use& C% W! I M' O; O4 E
- and a user account (username + password) that has the permissions to do stuff
7 e6 c7 N8 v( L5 W& a - with the database. Additionally, you will need a vendor library installed on the. O5 v- r S6 m& f4 o" Z# l
- local machine, this came with my MySQL install.7 h8 V- N3 b3 f: m- i# i5 B
- These instructions will not tell you how you might transfer your data from the# H2 K) A: |6 [* V$ w, @9 h
- SQLite database to the MySQL database, we start with a clean and empty MySQL5 \$ C4 N, D2 f. \
- database.9 C! r$ D0 _, M: j4 v
- Some users have reported ways to import a SQLite database into MySQL, but at5 V8 M* q! N( n) h' i
- the time of writing, there are still too many issues - check the current status3 N2 A9 N# N, C- W9 h3 M* V
- in the TeamSpeak forums if you are interested./ J0 B' A% B5 S" X( R
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
7 U4 a! b6 L$ J5 H# m, k* H - Borland was used. This driver can only interface with the client library that
% i( W9 }+ X* V# S - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
+ I8 s' W% Q! W: `# P0 f3 a0 f- L1 q - client library - basically all you have to do is to use a 3.x client library as
2 E- L$ |- P* G* p - "VendorLib" and a 4.x database to connect to.' N$ }9 |( c$ D% i! a4 B4 z& q
- If you need more info about dbExpress, you can contact Borland.- F1 ]7 v) Z( N; ^- m/ r- n
- 3 R: o/ Z8 Q: {9 _! Q- b
- ### Doing the work ###) j: M+ N. w( B7 [
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all$ l1 W3 d+ M- P1 h" A2 b
- the perquisites right, just open your server.ini file, and add this section at6 T5 g, Y* U9 }
- the end:. Z$ K. H/ k- I* T& [
- ---cut here---: D5 g: L! c5 d+ G
- [DBEXPRESS]
; P5 ~+ K/ U; w5 r5 I* V2 ?& } - sqldir=mysql_sql, @! N; {9 V8 `4 Q. C/ N
- Drivername=mysql o% X9 M% {' ~/ u
- Database=Your_Database_Name_Here5 K2 {+ w% B& z0 w+ v4 @1 p
- Hostname=The_PC_the_MySQL-Server_is_on
0 z5 X+ w' H' t - User_name=User_name_on_the_MySQL-Server
5 R* p) x5 U0 {) [ - Password=Password_to_go_with_above_user_name
2 u1 Q+ S2 n- \$ N9 C& M; F+ Q _ - GetDriverFunc=getSQLDriverMYSQL( R) t7 Q' |5 J
- VendorLib=path_pointing_at_your_mysql_vendor_lib0 C6 W9 a2 Q6 {8 Y) F1 |
- LibraryName=path_to_libsqlmy_libary
! I. v% H: y" i, T" ^$ d/ Y7 l - Active=18 K$ h8 d! J$ n
- ---cut here---
% m# O/ t3 s! f! |% W - In my environment (a linux box with a MySQL server running locally) I have:% W, W" u. Z" E3 D
- ---example---
+ l* O- R- ?9 m }+ t - [DBEXPRESS]
& ]8 ]. k* G% W1 ]! c - sqldir=mysql_sql
6 Z3 `" o- \( P8 z5 y* @, v - Drivername=mysql
$ |0 C" J! g; g2 a1 c) C; B. O - Database=test
. U, N0 n1 D6 ^; Z+ j+ s- A - Hostname=localhost
2 ?) f0 R5 I9 y# T, Z - User_name=testuser
2 e1 G8 ]" P w1 D - Password=my_password; M( M! \6 y/ D: x1 n) V5 T! }
- GetDriverFunc=getSQLDriverMYSQL! y, ^8 t) \ x. Q
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 F6 J+ c& @7 V
- LibraryName=./libsqlmy.so
' R# B) J9 y3 l- P% {4 x/ g! b$ b - Active=1' U1 V: ?) |) G
- ---example---
% b# s4 D1 M/ ^" q& q$ l - # I& r! x& N7 i8 B$ E% _
- On a windows box, also running the MySQL server locally, it would be:, E8 w0 S5 g1 S; d) @3 U% z: s4 F
- ---example---% j2 D, ^/ m. D1 u
- [DBEXPRESS]
5 M+ F4 Q9 N% h" x5 B - sqldir=mysql_sql6 A# b! E* G* I ]
- Drivername=mysql$ _; M; g" }. g; l M
- Database=test
8 @" {) y$ ~+ | l9 `0 G z6 M - Hostname=127.0.0.1
: M1 W, A: K9 b' J0 A" y - User_name=testuser8 l6 t* A8 w/ @, n4 ]/ J" f4 Q2 s
- Password=my_password
2 w' L N3 W: @/ Q' S# [) } - GetDriverFunc=getSQLDriverMYSQL( P5 L. ]3 i# p4 R* u6 j3 _6 a
- VendorLib=libmysql.dll" Y+ |2 p6 C- S8 \( L9 N. N
- LibraryName=dbexpmysql.dll/ U7 P: _6 d8 T7 f1 R! _. h7 S' s+ q
- Active=1' S' W3 T) l: M3 ^! N* [8 `
- ---example----# u0 F# A/ T9 a. w1 s3 t8 @# t
- - written 02.03.04 by pwk.linuxfan
+ x" U. S7 g7 `+ [, m* C( z- @ - : v) b( e V+ h! ^1 Z
复制代码 |
|