|
|
麻烦翻译一下,下面这段文章:xhan 1 U, B* L$ O P4 l7 ], G* \
5 I1 Q r! @9 ?8 |( d9 }% k, E-
% K* `" J+ `6 m8 q - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######. [& M. X: D0 ~! L H6 v7 q
- r# g) N: b3 m$ j
- ### What we need ###/ V, S2 a) q! f$ l4 e
- Naturally, we will need a MySQL server to store the data for us, this document
$ p7 ~1 n1 d) w2 N4 X3 S( ? - will not explain how this can be done - there are documents out there for the
6 s# i# p: r/ h( j - interested. The requirements include a (empty) database for TeamSpeak to use
3 ^) K, @) p9 ~) d% ^ - and a user account (username + password) that has the permissions to do stuff
) A6 g0 a" f4 @0 t" [ U/ E# E - with the database. Additionally, you will need a vendor library installed on the/ N9 }, Q& d& J+ |4 H& @- `) c9 X
- local machine, this came with my MySQL install.
7 s* H0 d& N& l! g - These instructions will not tell you how you might transfer your data from the8 I% f; i5 ?% t; D" j0 \
- SQLite database to the MySQL database, we start with a clean and empty MySQL
& B1 n( |$ Z' Q+ | - database.5 _% H4 `$ g- h1 ]4 t. ?
- Some users have reported ways to import a SQLite database into MySQL, but at
% |# F2 f2 e0 _+ E( g, v! n: ? - the time of writing, there are still too many issues - check the current status! [8 q5 ^; |5 A) ^
- in the TeamSpeak forums if you are interested.* a" k" O; V/ y# m8 d$ |/ {
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
4 `; v. ?0 Z( {( |. { - Borland was used. This driver can only interface with the client library that / D; j2 I0 D7 d- [9 U: d, q
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this5 Q; G) j+ P& h: |
- client library - basically all you have to do is to use a 3.x client library as
& p& q( W# V o; u: V; K5 X! o - "VendorLib" and a 4.x database to connect to.
3 j7 A" ^1 v, m. | - If you need more info about dbExpress, you can contact Borland.
. S# A5 I6 i$ n' a4 Z+ a( J - : z7 P7 P" D& C) X% B Q
- ### Doing the work ###2 K( p% w% y1 D' X
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 N5 c; V* i4 m; M+ Q1 x - the perquisites right, just open your server.ini file, and add this section at
; E; b0 ?/ ~0 F& B5 u% A - the end:
& i# D/ k% n# I6 J8 }% K/ \/ D! h1 B( K - ---cut here---1 G& D7 W' y& [! h- [# m
- [DBEXPRESS]
8 K, o& U2 V j7 g0 ~. A5 X4 B q - sqldir=mysql_sql; [# J- R, ]3 ?
- Drivername=mysql
6 S8 D# Z0 j1 c4 K - Database=Your_Database_Name_Here
- N) I3 z) j* R4 A3 u- d - Hostname=The_PC_the_MySQL-Server_is_on/ ~ \ l/ w+ q; F0 r
- User_name=User_name_on_the_MySQL-Server
8 s" I% H u6 d$ V, _0 o8 j - Password=Password_to_go_with_above_user_name
9 c6 J; B# N* j! Z. k9 y+ k - GetDriverFunc=getSQLDriverMYSQL
' n4 S; k1 o& ~5 Z- ~! x* t - VendorLib=path_pointing_at_your_mysql_vendor_lib
6 p5 P- M" w6 V/ ^ - LibraryName=path_to_libsqlmy_libary
# d' ~3 m+ L# O0 o' C" F" { - Active=1- O P; H; \, `
- ---cut here---' h- b A6 g. l+ E9 \) Z' q
- In my environment (a linux box with a MySQL server running locally) I have:! D) @8 m& y6 e% ?% _2 d' i0 K$ e/ ?
- ---example---
}3 P& [% d7 m6 C" | - [DBEXPRESS]7 C9 f! J; w* G) V% s ?+ s
- sqldir=mysql_sql. l7 b3 c2 k/ o: F/ q0 r4 \
- Drivername=mysql8 E0 P. L& c$ [/ b4 F9 H! ^/ f
- Database=test
- A% Z+ N2 p8 _ - Hostname=localhost3 M- L) e8 r) T( g3 u
- User_name=testuser5 @+ k/ j' `& I) ~- y1 g
- Password=my_password1 q& J2 F1 Z$ X1 G
- GetDriverFunc=getSQLDriverMYSQL
( S/ b/ B, p& M' B/ `! \8 s+ s6 t T - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( D; l' s7 F N6 G7 E6 D, o - LibraryName=./libsqlmy.so
+ F8 w5 ~+ U/ n9 f5 j/ j - Active=1
3 W" E8 U: M% t% \% V* o/ w2 }- W - ---example---& V- f% M& }9 l. W
$ A6 ` I: a7 S# O5 E- On a windows box, also running the MySQL server locally, it would be:% w6 R$ M- A6 {3 C
- ---example---; j% `& A2 P: x" y
- [DBEXPRESS]# O) w1 _ m6 F& V
- sqldir=mysql_sql
7 P9 k3 c/ L' {1 V - Drivername=mysql
9 i+ Z+ S9 M" ] c - Database=test
* _/ u/ O' S4 b& V1 ~ - Hostname=127.0.0.1
- J4 @. }" w5 L8 G0 J8 I - User_name=testuser" p+ g, ]% i8 Y& q, S
- Password=my_password8 } M: M6 H0 @# c |
- GetDriverFunc=getSQLDriverMYSQL
( c- w8 Q$ Y6 w0 ^ - VendorLib=libmysql.dll, N" H% R8 X% C; f7 n
- LibraryName=dbexpmysql.dll5 ~1 Y) v) [2 L- q% c: R) |
- Active=1
: {. z( ~. y" Y8 C3 W! z& k - ---example----; m9 ]/ [9 t0 u! n* b
- - written 02.03.04 by pwk.linuxfan
6 |4 ?' `6 q8 D9 w j+ [5 ? - 2 ?% h) d6 M6 ~' }" U
复制代码 |
|