|
|
麻烦翻译一下,下面这段文章:xhan + `% `. X; c" N/ C( j }" N
3 S, {" O/ \" A" w6 H+ z3 p$ S
-
# \( r! u+ P/ g4 U8 s% w - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######9 o- m2 L$ y" E7 n& z9 H+ m: R
- * U) G1 n9 E6 H" R& e& S! L
- ### What we need ###
& \: `) M7 Q" E - Naturally, we will need a MySQL server to store the data for us, this document
& k! O3 i- M( U- u - will not explain how this can be done - there are documents out there for the 2 n4 ^, }0 I' b) k) m% g8 W
- interested. The requirements include a (empty) database for TeamSpeak to use2 X- e& M. i( Y. Z* J
- and a user account (username + password) that has the permissions to do stuff; J* m6 } M I) u, j
- with the database. Additionally, you will need a vendor library installed on the+ V0 Q' O1 K, k2 c3 @ a8 D+ y
- local machine, this came with my MySQL install.
1 M8 l3 w5 }. t t - These instructions will not tell you how you might transfer your data from the
; c$ \$ c: s3 \ - SQLite database to the MySQL database, we start with a clean and empty MySQL
/ c1 A [3 M4 U, c2 v - database.: q% r. r) I- [. }9 ?2 \& i ~
- Some users have reported ways to import a SQLite database into MySQL, but at
* e( |) U: W% A2 f: ` - the time of writing, there are still too many issues - check the current status7 t# m' u$ V, d9 a" }) p0 n
- in the TeamSpeak forums if you are interested.4 r; A* s, f% ?; b' o: x
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
. E, L. x7 h, u# m6 Y, [ - Borland was used. This driver can only interface with the client library that
* `( v( ^5 v1 @6 V& i6 z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
. v6 e# V+ S9 I - client library - basically all you have to do is to use a 3.x client library as
2 E1 N* y) T/ L$ q) R& R - "VendorLib" and a 4.x database to connect to.& G! `% b& f0 E3 ]. g. g. Z1 o) I
- If you need more info about dbExpress, you can contact Borland.
+ O7 d* B2 `7 F& h - 9 a% ?1 C s" S" y7 N
- ### Doing the work ###8 t& M/ u: o" z
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all, f: n6 M9 b8 K: m" J
- the perquisites right, just open your server.ini file, and add this section at
4 r9 z: s, R: _7 X! v - the end:
4 a1 f$ d# _# v/ P* `* F; N - ---cut here---" m, f' ^/ \0 N- f" K4 F# _/ k% F
- [DBEXPRESS] m! Q$ m; J4 u6 A' o. @
- sqldir=mysql_sql
5 ?) m7 ]* n' Y- z - Drivername=mysql) c- s1 m" t1 M
- Database=Your_Database_Name_Here9 I9 B$ f- \2 R. L/ Z2 b- a# H
- Hostname=The_PC_the_MySQL-Server_is_on
+ G% t6 ]3 q3 ^ D, t - User_name=User_name_on_the_MySQL-Server% B3 T, x, A8 g6 ~9 Z- l
- Password=Password_to_go_with_above_user_name7 I7 g, |- ^3 ?# U" L
- GetDriverFunc=getSQLDriverMYSQL
2 W9 v0 C, [: R8 {6 {8 ?( N - VendorLib=path_pointing_at_your_mysql_vendor_lib
/ u9 H5 P& n. G/ T! m5 T d - LibraryName=path_to_libsqlmy_libary
$ t+ q6 s5 K3 I. W' _ - Active=1
, i# \- x4 a2 D6 R; u - ---cut here---
2 ^: t# s2 c5 e3 f- N4 n: ^ - In my environment (a linux box with a MySQL server running locally) I have:
0 ?0 e t( V# s9 _1 ~$ e - ---example---& d0 W$ A! x- o6 H+ h1 K
- [DBEXPRESS]: X2 H ?2 o' r6 u/ q1 ]) ^% w
- sqldir=mysql_sql' p. n6 @' l+ ~. z {8 U) T9 Q1 L
- Drivername=mysql t, M% J7 F4 K, k. g3 |" _ f. J0 K
- Database=test
, ~0 ~: c+ f+ O% W' r3 U' B - Hostname=localhost
& j8 d& T) ^6 q% E7 ` - User_name=testuser" ?, i0 ^2 f9 X ?: q
- Password=my_password+ l: k+ _# |$ |
- GetDriverFunc=getSQLDriverMYSQL6 r6 L' U2 j0 Z8 y
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0" h, X1 n$ Z6 E1 m
- LibraryName=./libsqlmy.so
- s9 q7 I) t3 L# [ - Active=1
$ D j: ?2 d1 \/ K% C+ o9 ^7 U1 w - ---example---
+ [3 F p" A7 r+ q# F+ G - * \3 G' T& E0 w$ n4 `8 V
- On a windows box, also running the MySQL server locally, it would be:
) a- ^7 ]/ {# ^ O t& j/ A) x - ---example---
7 a7 W* g7 W% |4 h! F! E+ _ - [DBEXPRESS]* {3 G8 g( ]) K+ [/ a0 x: g$ p+ p
- sqldir=mysql_sql6 h1 e( ^# d3 s. L7 y2 l/ h
- Drivername=mysql
+ m$ O. E* r- d - Database=test
* q! P8 [, \2 T, e7 _ - Hostname=127.0.0.1- a3 [5 S9 ^, o0 E4 R) N
- User_name=testuser6 S* f. }( g! t# ]4 s2 H7 l
- Password=my_password
2 y% `! D" l- L3 {6 u2 N5 s& ] - GetDriverFunc=getSQLDriverMYSQL N+ f* T. Q4 B7 K/ V4 N
- VendorLib=libmysql.dll9 v8 d( g% \( I7 U, `0 }: Z
- LibraryName=dbexpmysql.dll8 V* r' H) q6 s
- Active=13 S" \2 O# F9 ~9 P' p9 i
- ---example----/ E: j; B5 v6 A" q+ X3 s
- - written 02.03.04 by pwk.linuxfan) g s# G+ u3 M0 M, q" M
8 n8 v2 h( J3 L& M) N: g7 t# @
复制代码 |
|