|
|
麻烦翻译一下,下面这段文章:xhan ( O5 u/ O* r9 q* g
1 E% t* w+ d4 O. A4 q! i; |
- ; Y" x9 B1 r, ]# x! M5 y! G
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
8 R8 J/ ^3 \3 d. S! ^ - $ s! o' g3 W8 C" E: j- l
- ### What we need ###
6 j) ?" a. v2 L' b3 B - Naturally, we will need a MySQL server to store the data for us, this document % C, E' F. f/ @/ G4 _
- will not explain how this can be done - there are documents out there for the
3 d2 N( }7 }% N" i - interested. The requirements include a (empty) database for TeamSpeak to use
K1 F6 g3 b$ O& s' N+ A - and a user account (username + password) that has the permissions to do stuff
7 @( {( L6 G3 n: [$ @5 Q! b - with the database. Additionally, you will need a vendor library installed on the6 _# J, s: j2 Q
- local machine, this came with my MySQL install.- |6 H! U" A' w! I* U0 ?
- These instructions will not tell you how you might transfer your data from the) C g8 y& o1 j/ D5 T$ ]$ x
- SQLite database to the MySQL database, we start with a clean and empty MySQL$ J9 y! V; j' D. ~: H0 d* q* P
- database.) ~ @) I1 J% y# h- t# @8 a3 y
- Some users have reported ways to import a SQLite database into MySQL, but at
1 M) N6 ]$ X0 K9 Z* B - the time of writing, there are still too many issues - check the current status
I' l2 m/ ?) f - in the TeamSpeak forums if you are interested.* Q# \) v* W6 a0 \
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
; b7 p7 q1 i$ g - Borland was used. This driver can only interface with the client library that ( _% n6 X! X+ k, K" }' _6 Q, S
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
8 T& T9 L2 n* V9 c) N$ \ - client library - basically all you have to do is to use a 3.x client library as
+ W% l% }, P, ]3 m' ~ - "VendorLib" and a 4.x database to connect to.- W7 d& d3 f3 r2 i' ~$ y1 P7 H
- If you need more info about dbExpress, you can contact Borland.
' G# S$ r# g \6 }$ o - & h' R' m& p( Q& }& L6 w
- ### Doing the work ###* H V+ O+ F4 I! Z. w9 u
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all8 K; }5 t5 P) l9 a% t) N
- the perquisites right, just open your server.ini file, and add this section at1 Z# \: g# F1 Y& v( X4 H: P
- the end:% |' h# G* X2 ]
- ---cut here---9 x& H( {% t) v7 I+ {
- [DBEXPRESS]
9 r+ w. M7 P! s8 |! J$ G - sqldir=mysql_sql' `5 t! U- T* m( R# J+ x' {
- Drivername=mysql
9 \: C# N0 e' y6 H. ?7 y - Database=Your_Database_Name_Here! l$ g) a8 A! m+ t
- Hostname=The_PC_the_MySQL-Server_is_on) D8 o* U+ S# c3 {+ g* o$ {
- User_name=User_name_on_the_MySQL-Server) l( C- }( b2 w# z7 `8 p8 U# K) \
- Password=Password_to_go_with_above_user_name
0 E* Q. v% g2 O q2 L9 L$ I% \ - GetDriverFunc=getSQLDriverMYSQL
3 H# N+ } w* R - VendorLib=path_pointing_at_your_mysql_vendor_lib8 G8 B( g' d9 h6 M: [
- LibraryName=path_to_libsqlmy_libary
, h1 v* O" ]( t: j( l - Active=1
+ Q+ |2 E1 I; |+ }/ ~: S - ---cut here---
$ L( u, ?# t0 {2 ] - In my environment (a linux box with a MySQL server running locally) I have:$ o0 J# c; i; m7 Z
- ---example---% b) M% [6 R1 ]2 \- p& o
- [DBEXPRESS]. ]: |( R; L) J/ I0 {: k
- sqldir=mysql_sql" H) M5 }; g6 x
- Drivername=mysql+ `4 K( V b7 V. p+ n( l$ ]4 b
- Database=test
& i7 G6 r% V% k! H9 W; u5 w - Hostname=localhost
7 s7 o: i/ G$ m- q0 ] - User_name=testuser
) ^3 Y1 e7 g7 ~+ ?0 Q - Password=my_password
^# l- Q$ h( M" y: B( b, E - GetDriverFunc=getSQLDriverMYSQL
0 e( j7 Y) v4 Y9 k" U, T' { - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
5 W+ D( C' A0 n - LibraryName=./libsqlmy.so
7 U3 {- Q+ {% w# Y" R: w - Active=19 u7 Y/ r/ L* T6 c/ V% M9 Z2 [8 t( z
- ---example---3 A1 n+ D0 }2 c8 ]# _0 } g
% j! v$ d6 f) t8 [- On a windows box, also running the MySQL server locally, it would be:
! e1 L9 D! D' g4 K) b - ---example---! M0 b5 u1 x; s6 p) A3 J+ P
- [DBEXPRESS]1 [) _8 i. e$ V& K
- sqldir=mysql_sql
3 [8 c& x# d8 P% l - Drivername=mysql9 w) |) K# F) ]% X" W
- Database=test3 W) |: F. k( y. v8 M
- Hostname=127.0.0.18 s" P* F# \) q2 E ?
- User_name=testuser$ Z1 B& u8 h- l% \
- Password=my_password
$ u. F5 i U# f7 _ - GetDriverFunc=getSQLDriverMYSQL
7 j7 {( i6 S6 v( Z, |" I, g - VendorLib=libmysql.dll
. a( x' v. {. M4 F - LibraryName=dbexpmysql.dll( Z) T# C3 Q) F/ q, y" B! }
- Active=1
' Q0 U% b1 Y+ Y- a - ---example----0 f8 }7 E5 u; n( Z) F& X' q
- - written 02.03.04 by pwk.linuxfan
, w. W' j5 p6 x1 ^5 I4 F6 v$ P - . b% ^1 S4 m; u+ `4 ?. j
复制代码 |
|