|
|
麻烦翻译一下,下面这段文章:xhan
. F% z8 d) m9 [9 L) @) u( H4 _0 W$ q. A3 x9 |. x
- 8 y. ~* b5 H; ^: _4 T1 |
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ####### r3 ]& c4 v9 w" ^8 _6 U4 \/ a) b
+ {! k ^) @& i% c- ### What we need ###
; @7 Z/ S2 ^; C% e2 t - Naturally, we will need a MySQL server to store the data for us, this document - y. o0 N' D; r% }. u, Z( D
- will not explain how this can be done - there are documents out there for the
" V6 R0 `- k5 o8 |5 R. n0 e. Q _7 k - interested. The requirements include a (empty) database for TeamSpeak to use+ r- g0 ?6 E; _* \$ w0 l, L; {
- and a user account (username + password) that has the permissions to do stuff( q9 U' V) t" a7 y
- with the database. Additionally, you will need a vendor library installed on the* J+ W* D/ l; U7 [. I8 l& f+ V5 C
- local machine, this came with my MySQL install.
- m8 i; ~! R; l& [2 l' d0 c$ L& P - These instructions will not tell you how you might transfer your data from the
- Z: e" @3 Q+ ?" A, W& X - SQLite database to the MySQL database, we start with a clean and empty MySQL6 M8 u8 l& m/ ]) P/ k
- database.
. b2 C, z* p& s0 e( T1 m9 i - Some users have reported ways to import a SQLite database into MySQL, but at" m+ k( b+ p7 L, o4 {+ V0 {
- the time of writing, there are still too many issues - check the current status
: V) R, ~1 e- A% O3 _# R, Y3 c - in the TeamSpeak forums if you are interested.
; J' j4 ~2 O. A( \% w - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
2 n4 m( z* p0 ?- f9 f" T - Borland was used. This driver can only interface with the client library that
8 H2 n1 A e$ s- E1 N# k - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
3 d' B+ g2 B4 v2 a - client library - basically all you have to do is to use a 3.x client library as
- ~: W3 j1 X& U - "VendorLib" and a 4.x database to connect to.
7 F/ K2 z1 u6 ]; v. i - If you need more info about dbExpress, you can contact Borland.$ m3 B1 S9 G$ Y8 O$ b. J* [( c+ s
, k2 z$ h% ~9 z$ u" ~+ _: r) x6 p- ### Doing the work ###
\- m- j) a" ?! _" l5 i - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all: p' k9 Y" L6 H7 l' P
- the perquisites right, just open your server.ini file, and add this section at5 B: U$ B4 {0 D; s: l S* w
- the end:
7 _) ?. B8 a$ H; ^: [" E. V2 c - ---cut here---; ~/ J; ^5 Z2 x+ O; ]
- [DBEXPRESS]
, y& h' B! G+ q7 Y - sqldir=mysql_sql" u/ j ~& u% l. ~9 `$ n! ^
- Drivername=mysql
" v6 G- t4 @1 N - Database=Your_Database_Name_Here
1 t5 C( n5 ~3 t9 W( H! L& | - Hostname=The_PC_the_MySQL-Server_is_on" w7 r9 L, a2 ]8 ?
- User_name=User_name_on_the_MySQL-Server
( Q. U% w( n, c& n% u7 E+ \* A2 |5 Y - Password=Password_to_go_with_above_user_name; Z, C2 _+ Z% N \0 s9 H
- GetDriverFunc=getSQLDriverMYSQL& |+ ~% m9 Z( g
- VendorLib=path_pointing_at_your_mysql_vendor_lib
$ C3 [- i& \9 H" X/ _ A0 Y9 `1 I. f - LibraryName=path_to_libsqlmy_libary
0 K& o' }6 S, h7 h7 X - Active=1
5 `7 I0 x) k* R9 g- G8 h - ---cut here---
4 V* C! \& c: A9 p* S1 Y2 F - In my environment (a linux box with a MySQL server running locally) I have:
& n8 x4 `- w, U- g, b3 t( Y5 l - ---example--- a5 F8 K& T6 r4 ?' o
- [DBEXPRESS]$ ?& y E+ x! f* R* b) B+ n. e# b
- sqldir=mysql_sql
% n" _$ D5 d/ |2 y4 p - Drivername=mysql
, E: E" J7 ~; s$ w8 T% ^ - Database=test
: ~. F7 |7 W5 e8 V) D9 x7 o - Hostname=localhost8 w# e. q! S" C0 N6 X
- User_name=testuser
: W5 B: _! O( u2 o - Password=my_password
9 I/ e5 J ]# L" j. j5 u2 D9 p0 ? - GetDriverFunc=getSQLDriverMYSQL
" U- n& r, N7 \# N1 U( W; Q - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.09 J' G; m" A$ n3 \& A' a& i+ k8 k
- LibraryName=./libsqlmy.so' C$ d6 Y" H3 b6 C
- Active=1: n4 b H I' P6 _9 |! t
- ---example---. T4 I! ?3 j" G! w) M
- 9 j% s" G1 {4 Y; X
- On a windows box, also running the MySQL server locally, it would be:
; I1 v1 P1 u. F% [+ y2 G; \. Z - ---example---/ J+ k% b$ d6 l t
- [DBEXPRESS]
- K8 z0 J0 d. X+ y$ Y - sqldir=mysql_sql
( f8 D. R; \6 ^6 ^, b5 | - Drivername=mysql
& G6 J1 ^& ?' b; b( S) i - Database=test" I7 D4 \4 U f% l- D/ H
- Hostname=127.0.0.1
) z' `) e* e/ y" C9 X- L - User_name=testuser
' G. n* A' M# j/ H - Password=my_password9 T$ l% @, Z) ~! H9 `" X- a
- GetDriverFunc=getSQLDriverMYSQL
/ |0 Q1 R9 Y, M5 k9 O9 w; W - VendorLib=libmysql.dll
( p* @) c6 B* X0 [- p0 c - LibraryName=dbexpmysql.dll; p( n: a0 }# D6 i
- Active=1& \ `* @$ X/ R) u$ K
- ---example----# W" Y: b0 e2 ]: ?
- - written 02.03.04 by pwk.linuxfan1 [9 p/ o' r3 D0 E9 A* j
- 2 `- u g d5 r0 {$ p3 B) o
复制代码 |
|