|
|
麻烦翻译一下,下面这段文章:xhan 8 `0 a3 c& L: C5 k6 N1 X6 b) J. P+ [) O
! Y% y, [- p0 Y8 w+ m
-
3 d% }# C/ f* q( {0 ] - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
4 R' L2 X5 Q) x' F3 C7 G7 { - ! ?4 @; g4 o: H
- ### What we need ###
% x1 _) I/ t3 K+ R' f5 h @ - Naturally, we will need a MySQL server to store the data for us, this document
5 M4 H3 L& Z+ y" I! g. \' r9 ` - will not explain how this can be done - there are documents out there for the
8 q1 W5 T A: N2 M5 n - interested. The requirements include a (empty) database for TeamSpeak to use! `, r+ O8 Y) V! _1 ]
- and a user account (username + password) that has the permissions to do stuff
# o- Z- x9 E" _, @& N; a* v - with the database. Additionally, you will need a vendor library installed on the' ~6 |; p9 `; J$ ]( r
- local machine, this came with my MySQL install.) I+ h: T. {# C, w& }
- These instructions will not tell you how you might transfer your data from the7 q5 B2 s- W* w, S( L
- SQLite database to the MySQL database, we start with a clean and empty MySQL
, Q' }% O$ @3 {% f, Y7 W - database.
9 h# P3 r* \3 y8 r5 i: | - Some users have reported ways to import a SQLite database into MySQL, but at w9 `1 ]# }7 P6 H1 X
- the time of writing, there are still too many issues - check the current status W* k E. O( K A' n" Q& p$ B
- in the TeamSpeak forums if you are interested.2 Q. `! I! f2 t* B- }+ g4 M
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
& V. J/ g) n. ]* R' X- p. _- G - Borland was used. This driver can only interface with the client library that
3 B" e0 {% L" G) _7 }- L( d - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# O j5 Q$ S! f! P& j L- @
- client library - basically all you have to do is to use a 3.x client library as
+ [1 d/ B5 n. y - "VendorLib" and a 4.x database to connect to." |! U( m" R) g1 g
- If you need more info about dbExpress, you can contact Borland.$ X) j+ y1 U# }) H d+ ^
- " H6 O4 c4 E+ E& F
- ### Doing the work ###9 |1 H. s+ \( m* {# w- ?8 d) @
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ R; E' X6 B1 n
- the perquisites right, just open your server.ini file, and add this section at/ P* |) W% g& o
- the end:
/ V3 ^2 j* L; L - ---cut here---
' @; A A, l U, c - [DBEXPRESS]0 \% B. d! H7 b
- sqldir=mysql_sql
. t% I2 f" H1 z7 N& I - Drivername=mysql
, ] C2 p: [5 Q - Database=Your_Database_Name_Here/ { m9 @/ G) F& G
- Hostname=The_PC_the_MySQL-Server_is_on
5 q# Z7 G2 c4 ~5 ^) [2 H2 e - User_name=User_name_on_the_MySQL-Server
! @/ F: R) p1 m3 y, |5 w& Z - Password=Password_to_go_with_above_user_name
* Q4 o# J9 K' ]# Q% }# j: q - GetDriverFunc=getSQLDriverMYSQL
. G5 ^( t+ z. r# ? - VendorLib=path_pointing_at_your_mysql_vendor_lib
- \8 h# H ~9 g6 J% { - LibraryName=path_to_libsqlmy_libary1 L/ A9 S2 f }+ x7 n
- Active=1
! M _6 S. e% z) Z' L! v4 a7 S - ---cut here---
! }( c e! e, m6 F' r - In my environment (a linux box with a MySQL server running locally) I have:
: a: C& e# _/ P# m& J5 }# H - ---example---
9 g) Z. \+ r: Q/ E8 t - [DBEXPRESS], t, u6 _& B; K+ l7 d5 l
- sqldir=mysql_sql
+ W3 [# V( x* { a% E - Drivername=mysql, k0 Z% u3 D+ S$ f8 c6 b
- Database=test
Z0 T0 Q2 s% I- P) n5 A, @! t4 } x2 Z - Hostname=localhost$ h2 u) `. `! l0 e
- User_name=testuser
% }0 `5 `0 |' e$ s: B, f; R - Password=my_password( G) s( w$ @6 ^7 \3 `1 g
- GetDriverFunc=getSQLDriverMYSQL9 y/ T. z$ w7 p4 m1 A6 Y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.03 P6 v# t2 B- V6 a z+ d2 Q
- LibraryName=./libsqlmy.so# A: K: T. F7 b1 u0 X6 K
- Active=1
) @" X- G3 a% l6 r/ {+ G - ---example---" p5 m6 a( ?% I
1 c( \ r1 G9 O5 j0 O+ `- On a windows box, also running the MySQL server locally, it would be:# M" f& |1 {! C) _& z
- ---example---
+ X/ Q1 L: j$ W - [DBEXPRESS]
. t6 V& p9 Q# j% S4 u; B! _ - sqldir=mysql_sql4 `7 j' U4 n0 y) ^& [
- Drivername=mysql! ]9 V: c6 O: ]7 l2 }
- Database=test
' X, \0 c: g* T2 [. R - Hostname=127.0.0.1
3 ]! U' N1 T8 Q) b! I8 Y ] - User_name=testuser% Y6 e; O. j N. c& f0 l( U
- Password=my_password/ p; B+ K" v; W
- GetDriverFunc=getSQLDriverMYSQL
2 s- V! S! n+ O# D+ l6 B - VendorLib=libmysql.dll
7 E4 E" R! B4 V& H8 b: K7 B - LibraryName=dbexpmysql.dll1 S( Z* S4 u# f( J& t4 c/ g! G8 s' Q
- Active=1
w+ L' f2 H- j; K - ---example----
! W# `. K z8 o g* e7 L' { - - written 02.03.04 by pwk.linuxfan& q% Y- E5 D, i# v D9 n/ f
( H* h# u/ M* ]$ s
复制代码 |
|