|
|
麻烦翻译一下,下面这段文章:xhan , G- z) g7 C" g9 c, J; M. g
l: v* J. c9 _; I9 N, `
- 9 J/ s6 V& h1 _ P. @- b
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######: J2 g) y& e4 w" c4 v
- ( C& k, K+ Q6 d) f9 c# I! @- W
- ### What we need #### `, [7 W" Q. `$ Z4 E% h- Q
- Naturally, we will need a MySQL server to store the data for us, this document $ x" S* N- e% P0 J5 I
- will not explain how this can be done - there are documents out there for the
$ U& v4 F* L: N# s# Z7 i& @. w - interested. The requirements include a (empty) database for TeamSpeak to use
2 `$ }8 {% ^' H9 P1 O; H4 | - and a user account (username + password) that has the permissions to do stuff! B, W8 u9 n. w/ N) d& }& u W
- with the database. Additionally, you will need a vendor library installed on the
5 G- K. z' r9 ~/ F7 a r - local machine, this came with my MySQL install.
* p. C! ?. e0 \# A- }8 m6 ` - These instructions will not tell you how you might transfer your data from the1 G; T+ B, Z" G$ S: n' ~
- SQLite database to the MySQL database, we start with a clean and empty MySQL8 C% h* E" v/ w$ G1 w0 b
- database.
) |# p X7 A! S* ^ - Some users have reported ways to import a SQLite database into MySQL, but at6 a- Y3 K! E$ Z% d) w0 @
- the time of writing, there are still too many issues - check the current status
0 Q2 \5 o8 V: V4 B0 @ - in the TeamSpeak forums if you are interested.
% W6 O: c0 y5 v2 @9 E - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
, y+ ?& {: k- ~' y3 c& y - Borland was used. This driver can only interface with the client library that
; D6 J3 J3 R3 x' H/ {% P& } - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
# ^$ ~! O* `. X! E0 M3 b0 F4 o2 M - client library - basically all you have to do is to use a 3.x client library as 3 ~; C, S/ g8 `( U- P& R3 E) z% m
- "VendorLib" and a 4.x database to connect to.
( Z' ]7 t" n9 S% I. M. G - If you need more info about dbExpress, you can contact Borland.! _- t5 h- Y2 S0 i9 B- J
0 U8 d7 Q6 B5 ~- ### Doing the work ###
+ j0 x. Q! l% b) y) a1 X2 g( s, u - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& S3 l3 k0 `! M$ p
- the perquisites right, just open your server.ini file, and add this section at. E N0 e. f) g2 ~6 y) S) L1 M
- the end:2 |6 c7 H; k% Y0 @
- ---cut here---) c9 Q, K* p$ z$ J3 G
- [DBEXPRESS]9 ~* c/ l$ P; A5 q3 v2 R& g
- sqldir=mysql_sql
3 L _/ ?! i# c2 d - Drivername=mysql
$ x- n$ \( I) e+ K: v/ M ] - Database=Your_Database_Name_Here
/ Y6 O: t2 O; I3 f% r# a+ f - Hostname=The_PC_the_MySQL-Server_is_on
$ N1 l! I, C- X9 V0 |0 ^ - User_name=User_name_on_the_MySQL-Server: Y, e6 C1 S) t4 p9 C+ J4 [
- Password=Password_to_go_with_above_user_name
4 a: E3 \% d# r - GetDriverFunc=getSQLDriverMYSQL, m, D# d4 ^' Y
- VendorLib=path_pointing_at_your_mysql_vendor_lib
$ }! i5 k: u* P8 ~! b. E% } - LibraryName=path_to_libsqlmy_libary K2 s: \/ {' z g# K" o
- Active=1
% U3 ]7 S' F$ Z) J% u - ---cut here---3 B& T/ O1 }5 Y' A/ x
- In my environment (a linux box with a MySQL server running locally) I have:
4 s0 w- M' E, Y4 T8 D6 U - ---example---6 x; `! ~# t5 q* F6 }' y v
- [DBEXPRESS]
_! M( a; o- F+ O |* }' |0 d - sqldir=mysql_sql) q. r* `2 }1 ]! n7 \: {$ [
- Drivername=mysql2 I& u1 P7 t2 f8 B9 y9 G
- Database=test
& D# j) C6 ], `/ D - Hostname=localhost& c1 {. `% V- X% \3 Q9 R3 p/ R3 o
- User_name=testuser
! f! L, d7 d: E2 O# l. w7 M - Password=my_password- [8 m4 f& t( I1 W
- GetDriverFunc=getSQLDriverMYSQL0 q* a) `* ^/ T9 r: m+ v
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.09 k( S$ }( I/ g7 Z. C7 I
- LibraryName=./libsqlmy.so+ R( E$ n: N; N6 H8 a% V
- Active=1( @. L' S1 `& U% P
- ---example---
# g- m' ?8 P9 C( X- D
2 @; T0 }- _+ j) G- ]$ ]; F- On a windows box, also running the MySQL server locally, it would be:
3 `7 [% B7 @: [) o3 W0 N - ---example---
( [" r) P* T/ g1 O5 B - [DBEXPRESS]
5 Y# b& A: M6 ?1 B5 Z4 k - sqldir=mysql_sql
1 n D1 }* k& C% ~ - Drivername=mysql
1 Y6 ~- m( Y5 N7 ]* X - Database=test
# U" K7 f7 d6 k% \0 T - Hostname=127.0.0.1' Q, H: o7 M6 U& r
- User_name=testuser8 z8 S1 H0 K2 G. U) B: P
- Password=my_password* C5 H$ y, R, Y- i( u0 W+ P
- GetDriverFunc=getSQLDriverMYSQL
5 n" C- \, z; C9 @ - VendorLib=libmysql.dll7 f% h& h6 A5 L$ K# T1 s: ?$ q
- LibraryName=dbexpmysql.dll
4 J5 |. ]. f( T - Active=14 c! b% e$ {/ |; q% w- w. U
- ---example----
9 w- R9 S8 _9 f. t3 w - - written 02.03.04 by pwk.linuxfan/ f. S2 q7 M# l# B/ ]/ K
- + ]: e- f2 E5 g S9 H# C/ I( d$ g
复制代码 |
|