|
|
麻烦翻译一下,下面这段文章:xhan
/ Q$ B2 w4 F4 E- _1 u" I- H6 X+ u; E1 E6 o# l
-
4 X& {+ @* d2 j0 y, C - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######1 z9 O9 X. L& _ j" q
- + M& M5 w4 J0 k4 E w. a
- ### What we need ###- r8 x( H2 G9 \9 X% r& p, N
- Naturally, we will need a MySQL server to store the data for us, this document
+ j5 |; f( X1 I - will not explain how this can be done - there are documents out there for the
: E1 ?# z/ f& `2 U K% g - interested. The requirements include a (empty) database for TeamSpeak to use( f4 q/ b; R6 \* p) ?) d4 `
- and a user account (username + password) that has the permissions to do stuff" }( W0 n) L' }2 p# Z
- with the database. Additionally, you will need a vendor library installed on the, M6 ~$ y& D k9 N7 [; O B
- local machine, this came with my MySQL install.5 @. a3 ^( ~5 J
- These instructions will not tell you how you might transfer your data from the5 @+ W7 f3 i3 U( N
- SQLite database to the MySQL database, we start with a clean and empty MySQL
7 F! I1 S" B( u# d% N0 p3 t - database.- h- I/ a: P1 q* e( a0 R
- Some users have reported ways to import a SQLite database into MySQL, but at( M! P( [8 p7 B' c& I; a
- the time of writing, there are still too many issues - check the current status
& f- ^; W6 d7 `# v& R: ?+ f - in the TeamSpeak forums if you are interested.% K6 J; ]0 L+ R7 [8 X# b
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from5 B# v6 Y- G& q. D' g0 S* p$ `
- Borland was used. This driver can only interface with the client library that
+ k4 t+ }; T% s - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
7 Q( r0 ]# P# {2 o" U - client library - basically all you have to do is to use a 3.x client library as
; z$ p2 O( O! [3 o! S6 v - "VendorLib" and a 4.x database to connect to.
: \8 ?4 y5 }& {) ]* Z. p' E/ N; R - If you need more info about dbExpress, you can contact Borland.$ J- @7 v$ w' o5 Y: B/ [/ H
% a. n+ L6 ~ B* z- \ H7 Z; j1 f8 F- ### Doing the work ###
' t, M1 J* A0 U6 l" v - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
5 d+ u$ b z1 X- b' S$ F$ y V" P" V - the perquisites right, just open your server.ini file, and add this section at$ F/ n$ Z4 L, \4 `+ Z& s; R
- the end:
8 e& Q) G& K: t l - ---cut here---6 b9 t0 G+ X, P) b! D p
- [DBEXPRESS]$ R- e% G' p# ^( i7 \% Y
- sqldir=mysql_sql& X3 g7 y# W" ]9 J
- Drivername=mysql
0 g0 i m% C. K - Database=Your_Database_Name_Here8 X% C5 v8 m/ [" a, n; \, \9 _) {9 A
- Hostname=The_PC_the_MySQL-Server_is_on% y4 U# h- T, ^- |% v
- User_name=User_name_on_the_MySQL-Server
& G6 q3 Y4 X+ l - Password=Password_to_go_with_above_user_name
/ v6 F6 o, T7 O D7 E - GetDriverFunc=getSQLDriverMYSQL# H5 N. j; z; n5 H1 g; i7 y
- VendorLib=path_pointing_at_your_mysql_vendor_lib- R6 C! A4 U8 ^+ I4 v3 I2 g) _( B I/ A
- LibraryName=path_to_libsqlmy_libary
8 N& }) R4 A2 Q$ [ - Active=17 t- X3 e3 N6 m
- ---cut here---- P/ p4 \- O( w3 `: H, A- M
- In my environment (a linux box with a MySQL server running locally) I have:+ ?6 ]9 P2 v2 G* H# O
- ---example---
* p8 N0 ^, l" L - [DBEXPRESS]! Q5 W* Z s; D" r; |$ |
- sqldir=mysql_sql, B0 t7 ^& ?& k, v/ n1 ^' {
- Drivername=mysql, M, f) K/ s% V* n: \+ D; t; }; Q/ E
- Database=test
* f5 ^' a; n6 C$ V& |' A( r - Hostname=localhost5 k" T" I+ X7 i2 q, y
- User_name=testuser5 p A- h) b- `) Y3 [4 v
- Password=my_password
; t2 R, @% Q4 T2 { - GetDriverFunc=getSQLDriverMYSQL6 Z+ x& ?. v$ R" O8 p1 A, V
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- O9 w# v1 |7 b) V4 T! s2 r- U - LibraryName=./libsqlmy.so
3 S0 D& V* P; f7 s4 F - Active=18 g1 \# D) H" T0 S
- ---example---. j" D- p% }1 \: ]5 K- @# L$ o
- ' j- [7 M5 m; g9 t0 x: g; n
- On a windows box, also running the MySQL server locally, it would be:
" ?! l" a, n; W, m" [ - ---example---
* M( x E0 Q; m3 E - [DBEXPRESS]
/ P) ]. V- _$ y - sqldir=mysql_sql$ H, p G3 Y$ q# B, Z
- Drivername=mysql+ n* \4 M: j, C A
- Database=test
/ x6 d/ `3 }5 k3 W - Hostname=127.0.0.1+ Q& s% W0 s, F" H7 u. m
- User_name=testuser
g( T: G: o$ a0 r3 Q2 a - Password=my_password
% ]+ V7 V! w6 @4 x+ j& a - GetDriverFunc=getSQLDriverMYSQL
/ n8 T m' D0 g/ [5 l9 d2 M - VendorLib=libmysql.dll
: g9 B+ H6 D5 A6 Q - LibraryName=dbexpmysql.dll
; Z3 ^3 j! Z7 Q& y - Active=1: w w' r9 V6 m1 f4 }2 d
- ---example----3 I6 [* ~2 R/ V0 T% e7 R
- - written 02.03.04 by pwk.linuxfan
$ e( f* r# V3 J1 N9 z
8 x! v" b! z; y. J. @& y
复制代码 |
|