|
|
麻烦翻译一下,下面这段文章:xhan
; ]4 S0 t8 Z" w1 X4 s7 i) ~- S4 ]3 K. _8 \ G! b7 @) }
- & l: a) ^* j7 w* n8 X/ Q
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######0 \1 Z. C) U4 l7 z
: W4 ?& n( f* w- ### What we need ###7 i, [' j e4 Q" l% H
- Naturally, we will need a MySQL server to store the data for us, this document
& y L0 R6 I+ O: \/ E2 c - will not explain how this can be done - there are documents out there for the $ o5 p" H1 D0 o1 ], v1 y
- interested. The requirements include a (empty) database for TeamSpeak to use6 v$ F. o1 q: W; S
- and a user account (username + password) that has the permissions to do stuff1 a' W: n8 I4 T2 u
- with the database. Additionally, you will need a vendor library installed on the3 V1 A F) m- ]) y
- local machine, this came with my MySQL install.$ \3 @: z/ T( N
- These instructions will not tell you how you might transfer your data from the- C6 `0 a7 `& O
- SQLite database to the MySQL database, we start with a clean and empty MySQL
' h9 e! C6 F' Q - database.
# R/ f; i$ g# Q5 J - Some users have reported ways to import a SQLite database into MySQL, but at
! k1 U2 c2 b z4 y8 W0 m, \+ K - the time of writing, there are still too many issues - check the current status
+ B% S5 j4 U+ Y' Z$ L6 W3 k" _ - in the TeamSpeak forums if you are interested.2 E: {; M. e$ x9 h4 ]$ v
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from4 h) g' F" j! R' B5 r) o
- Borland was used. This driver can only interface with the client library that 1 [; l3 d; S9 ?8 p
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 R8 @* W( `' C9 J9 m4 Q
- client library - basically all you have to do is to use a 3.x client library as
' v' v0 G; A4 R5 x - "VendorLib" and a 4.x database to connect to.
; l y) [# C! b. S1 z( b+ J" s- k- G - If you need more info about dbExpress, you can contact Borland.0 A1 y' o; d* ?* K7 N: t+ W! y1 M
; A* W6 _, @$ b+ o% }& p- ### Doing the work ###
3 z) e- B# `. O9 ?7 Q - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all& c! G1 i7 ?+ n# ~' M
- the perquisites right, just open your server.ini file, and add this section at! E5 i0 ~0 ^8 }
- the end:
. q( O) H$ m) J1 G$ M8 H& x1 q9 V - ---cut here---
( g _" b# d! @7 C& K- } - [DBEXPRESS]# w. }9 L% D, I3 Y
- sqldir=mysql_sql
2 v3 {& O$ s! j0 c6 }* C - Drivername=mysql
3 Z, r5 i( t4 D6 u! t0 r1 e: n - Database=Your_Database_Name_Here
7 b1 y( ]9 H" l6 y9 Y - Hostname=The_PC_the_MySQL-Server_is_on
1 _2 b, z8 V' F A; r7 v( a3 e6 U - User_name=User_name_on_the_MySQL-Server
" h! R6 K! b9 J0 L7 e - Password=Password_to_go_with_above_user_name& s0 }. L9 x" N6 J
- GetDriverFunc=getSQLDriverMYSQL
' |8 H- X3 I) G2 ~! N - VendorLib=path_pointing_at_your_mysql_vendor_lib8 ?& v- _% }) G0 s1 l1 U) Q. k
- LibraryName=path_to_libsqlmy_libary, T/ v! K5 v5 I% ~
- Active=1* ^0 x+ C4 T7 L7 M- Q: i
- ---cut here---
7 p* [5 E+ S, n; L* q, {: T - In my environment (a linux box with a MySQL server running locally) I have:
3 G6 R% w0 }4 K3 u3 f' K - ---example---
! j+ G; J# I9 g! s- k - [DBEXPRESS]
9 S0 i$ c0 c: H - sqldir=mysql_sql
; H. {; @, t# A - Drivername=mysql" X F3 Q a0 b- L/ V: e, ?" P
- Database=test
3 E) ~/ A. u) v+ v' {) \' h - Hostname=localhost- v' [5 x* t$ t! B
- User_name=testuser
3 M8 z% o* k" i1 l - Password=my_password; Z/ z3 t0 G5 t1 O% n& n
- GetDriverFunc=getSQLDriverMYSQL
8 |4 H- X' D8 {. w# \: G - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.07 e3 s+ K- i/ Q# H7 X
- LibraryName=./libsqlmy.so+ C4 w- y: K( `* s. j
- Active=1) U6 @! w; Y8 F: N, Y( a3 l1 Z5 v) z
- ---example---
7 t8 f8 }6 N& m - ; g+ s2 f8 ^. ?/ E( x
- On a windows box, also running the MySQL server locally, it would be:% L3 C- [3 A* ^ P+ G/ w) u8 _
- ---example---
j) I% ]/ P6 \* S: F# b, ]7 x - [DBEXPRESS]
{% G6 v5 D5 z; h - sqldir=mysql_sql, j" \" m* F' F8 X3 h
- Drivername=mysql
+ m ~$ h$ o+ R4 k" s - Database=test; p4 Y6 Q# l' ?0 [
- Hostname=127.0.0.1* w, i3 W/ L" `! r; N& V2 d. H
- User_name=testuser, O; F$ Z1 c& n( ^ s
- Password=my_password
2 c9 N7 p+ ]* ?9 ]) `! k- O- e6 @ - GetDriverFunc=getSQLDriverMYSQL% J( q5 ]: o6 n# z
- VendorLib=libmysql.dll: T" C) d! E! Z9 \
- LibraryName=dbexpmysql.dll
2 h M8 G- Q( B8 K - Active=1
3 Z, v) v1 c+ f6 p% b - ---example----+ E I% D4 _! k$ v/ y
- - written 02.03.04 by pwk.linuxfan
" E& f4 q( O9 V6 d. H7 @ - # z# h; ]% W+ C8 _* n
复制代码 |
|