|
|
麻烦翻译一下,下面这段文章:xhan
' B# h& J) H. h. K
) Z! v: s3 b6 m$ j1 H/ f) g1 z-
D( @! r$ X5 C - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######4 O! [- r ^* O/ ^6 M. I
1 E& j3 L. v: c. M9 z6 o3 m) [- ### What we need ###- V& V; T0 q$ j# b3 O6 q' z
- Naturally, we will need a MySQL server to store the data for us, this document
; }! Y1 j6 \6 ^6 C( z - will not explain how this can be done - there are documents out there for the
' d6 u2 S$ b7 M - interested. The requirements include a (empty) database for TeamSpeak to use: D7 g4 y% \( y9 j8 B
- and a user account (username + password) that has the permissions to do stuff( _# Y. x: o( s, J7 X+ s4 Q
- with the database. Additionally, you will need a vendor library installed on the$ b7 z3 u8 `+ f) r! B; ~( q6 A
- local machine, this came with my MySQL install.! x; M* m: \# x! ~# g" [
- These instructions will not tell you how you might transfer your data from the+ H! o' m* U' v) N7 W
- SQLite database to the MySQL database, we start with a clean and empty MySQL& P3 E; r) Z+ O, h2 j
- database.
8 ?4 }/ s/ {% N+ M! }) c - Some users have reported ways to import a SQLite database into MySQL, but at
0 L K4 A V% y" u2 X$ I1 K - the time of writing, there are still too many issues - check the current status
0 z( c7 p3 Q2 z V1 B - in the TeamSpeak forums if you are interested.9 a+ Q( h" Y7 m: w* t- D& c
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from2 Y+ J0 R/ \, v" u; T B
- Borland was used. This driver can only interface with the client library that
' z6 s7 v& [+ v: S- P. | - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this0 }- T; B) o8 L
- client library - basically all you have to do is to use a 3.x client library as
: Y1 Z, S4 X5 G - "VendorLib" and a 4.x database to connect to.
0 R# z7 ?' }9 v& Z" E5 ?2 i) ~ - If you need more info about dbExpress, you can contact Borland.
$ V! a% h v9 w( h
$ }, x5 E/ g& ]# G- ### Doing the work ###
4 P. r9 N6 u. b9 R/ ?6 A3 G - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all% U; X" u0 x5 O( b$ P9 \
- the perquisites right, just open your server.ini file, and add this section at
( K8 y& P! g& ]3 o - the end:: v9 u1 d# B. P5 k
- ---cut here---+ J0 w) v" x) H
- [DBEXPRESS]
3 E5 ~( i0 Q7 w. I - sqldir=mysql_sql
V4 y" P8 T% }/ I* t0 q' H - Drivername=mysql1 [) i* H! o3 B+ k5 |
- Database=Your_Database_Name_Here" M( r! f' X" e1 _3 N- w I& l+ i, j
- Hostname=The_PC_the_MySQL-Server_is_on
5 v9 B5 a' A5 d2 ^ - User_name=User_name_on_the_MySQL-Server4 L! H3 }$ M* r( d* y& R
- Password=Password_to_go_with_above_user_name
; \( n: r" Y9 z$ \7 R0 { - GetDriverFunc=getSQLDriverMYSQL% D1 B2 g k0 }$ h1 a
- VendorLib=path_pointing_at_your_mysql_vendor_lib4 M8 Q. Q1 D4 O! y' B; ~0 f
- LibraryName=path_to_libsqlmy_libary( } f8 B G6 ^
- Active=1) _; S, Z4 H% F v8 V
- ---cut here---3 P$ T5 ^' ~/ v& M# |
- In my environment (a linux box with a MySQL server running locally) I have:# _% H0 r! a" v% V* D6 [/ l
- ---example---$ i6 b+ V9 y5 o! e3 Z' B& q
- [DBEXPRESS]
" c$ n. ~, B7 ? - sqldir=mysql_sql S) W0 e6 n [0 \+ J( c }
- Drivername=mysql' s9 ~+ q& s* ?0 W9 ]0 ?7 ~
- Database=test
: t' n+ U. n4 h2 [) f - Hostname=localhost
T* M* h" ?' p4 p- j& ^9 z0 D - User_name=testuser
4 E; |& d2 u! P S. V - Password=my_password
; H9 R& X) a) z7 i" e, T' L - GetDriverFunc=getSQLDriverMYSQL
' b6 }0 B6 N0 v0 z3 [ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( R5 l) b) R2 h5 K* \. R - LibraryName=./libsqlmy.so
3 D4 @3 j) V7 A/ ^3 L - Active=1' X2 l8 T; ]; o t; Q
- ---example---" R) D! |, i3 A7 O& d( e- t9 q" _
- * m! x0 ?: `. b! u
- On a windows box, also running the MySQL server locally, it would be:/ w) z. ?7 H9 }( S
- ---example---
) t4 S& ~3 ~- f4 @% i - [DBEXPRESS]
' L) m! } S Y/ t/ E/ n - sqldir=mysql_sql J* o+ k5 d" @+ w% [8 R, Q
- Drivername=mysql% F. C$ U" v* h3 H
- Database=test7 {: T3 f0 \9 c! X* C
- Hostname=127.0.0.1: ^% ?- Q9 u6 }: B$ u3 h: w7 @
- User_name=testuser% p E! e, e* Q' U
- Password=my_password# D5 p- }4 p# o9 s# _
- GetDriverFunc=getSQLDriverMYSQL
7 U' q( A& G4 o2 n% A+ W - VendorLib=libmysql.dll8 M8 T6 Z# Z, f
- LibraryName=dbexpmysql.dll- X; ~3 P& z7 E; J* l+ m
- Active=1- ]$ x2 ^2 s5 z8 F: s
- ---example----
+ ^+ X0 X! ?1 n. F - - written 02.03.04 by pwk.linuxfan( y' |5 {; d3 z" |
5 t) C6 f$ t, O1 \7 a8 e
复制代码 |
|