|
|
麻烦翻译一下,下面这段文章:xhan % _; O$ \) |1 d& {4 j# ]# H: p
) b, \: O# w) C9 |! f B- / M2 F( E4 F" X3 `) L. [: j( W$ f
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
" ^# T# E% y- W) n! h
* b; X! ^' D9 K7 Q- ### What we need ###
W6 g7 H7 i) h' a# b N6 e" o( t - Naturally, we will need a MySQL server to store the data for us, this document
( N3 ?$ X+ y! | - will not explain how this can be done - there are documents out there for the 0 h O r3 }0 }$ [6 d7 Z! U8 c) R
- interested. The requirements include a (empty) database for TeamSpeak to use) D' v2 b/ p3 @ z) _! }- A& U9 o
- and a user account (username + password) that has the permissions to do stuff; N0 n1 N; C) Y; [$ r9 u& H/ Z
- with the database. Additionally, you will need a vendor library installed on the8 a, V) B6 Y: H y& @& B
- local machine, this came with my MySQL install." E/ Q! N2 i" J2 G& k( j6 [# e
- These instructions will not tell you how you might transfer your data from the
% J* |( F! r p1 O+ A3 L( f2 w$ ]6 R - SQLite database to the MySQL database, we start with a clean and empty MySQL {5 @) o) k7 L3 Z
- database.# _$ i0 v5 _7 |! i) }0 q x7 g5 \
- Some users have reported ways to import a SQLite database into MySQL, but at4 T; c3 T% @: u4 O; P! ^& M
- the time of writing, there are still too many issues - check the current status
4 Z+ I3 P# H2 l& I; U - in the TeamSpeak forums if you are interested.
9 B7 y$ c+ U; F1 B - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
( E+ D! I. Q2 Q" I& I3 a - Borland was used. This driver can only interface with the client library that . f( o; M5 |. n% l
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this9 }- f5 t2 |8 k# U7 K b
- client library - basically all you have to do is to use a 3.x client library as 1 o' h# S% E- \' }7 p
- "VendorLib" and a 4.x database to connect to.' l1 {& d+ j+ c, ^* y
- If you need more info about dbExpress, you can contact Borland.
( U$ F- u7 b3 [) X3 n4 `' c - , R9 X( i/ b5 v# C
- ### Doing the work ###
" F2 s6 `9 g) t - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
7 x7 T" b8 j# B% ]. |- k% R - the perquisites right, just open your server.ini file, and add this section at
. `( O2 d. @( U - the end:
% M7 r M* J3 B& l4 ~' n. g+ Z6 a% i# W - ---cut here---
7 ^3 `+ f" z6 ^) s - [DBEXPRESS]
* s" \; w" Z, p5 B Z! Z6 G - sqldir=mysql_sql5 e% U( s! S7 B5 z3 u- c
- Drivername=mysql
6 f& L! Y3 K3 X; j - Database=Your_Database_Name_Here; i0 O5 H3 K; k& i
- Hostname=The_PC_the_MySQL-Server_is_on5 L8 W0 L. C' q
- User_name=User_name_on_the_MySQL-Server
r' w% D! m1 i8 c/ b - Password=Password_to_go_with_above_user_name9 Q c. r" e5 }9 @1 O
- GetDriverFunc=getSQLDriverMYSQL
* ~* K. Z# y8 a' c" @ - VendorLib=path_pointing_at_your_mysql_vendor_lib0 M7 s6 _7 d( f6 Z! J: ~
- LibraryName=path_to_libsqlmy_libary% I" n5 J: H9 L% N% P
- Active=17 ?8 S7 C1 t% ^, k0 N' `# {; N
- ---cut here--- \1 e% ^9 E4 C; y# \
- In my environment (a linux box with a MySQL server running locally) I have:, F) y$ s8 t7 t1 h2 P+ m9 S
- ---example---' E5 H* v# q# a1 B
- [DBEXPRESS], @7 r3 `+ \. s7 v' N
- sqldir=mysql_sql4 g- M! w5 t' ]
- Drivername=mysql/ P0 ]+ G$ E( b8 B: Q+ l
- Database=test( P& J4 b0 j# ?6 q4 a: M% P; N% Q
- Hostname=localhost; d0 z7 L( A' z+ i0 C
- User_name=testuser. X! {2 ?1 D, ]& }. K8 T. K) q$ ]
- Password=my_password* F, \/ R' Y" s5 T) h$ y+ I
- GetDriverFunc=getSQLDriverMYSQL7 g6 H6 {0 s3 k9 o
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
( F+ s0 o: w; b6 a- f8 k - LibraryName=./libsqlmy.so
- x5 `, ]5 x' k, Y* @ - Active=13 k! _" T6 V1 x1 L: p, _
- ---example---
" a' B5 A2 v D0 `6 C
2 R/ n4 t" i# }7 m, I8 J- On a windows box, also running the MySQL server locally, it would be:
! f. i5 f) |* C" m# K - ---example---
; s# B: F9 d# w0 N# C - [DBEXPRESS]
& e' ^8 f2 u) i+ \ - sqldir=mysql_sql# c) Y7 ~7 X3 a; q
- Drivername=mysql
$ s: [ u1 q4 m$ B - Database=test5 E" g5 `8 J. A3 s6 E8 _- x
- Hostname=127.0.0.1
4 |6 a5 {) W, }% h7 r" x% Q - User_name=testuser6 y3 n$ D4 k/ t" E1 j, R* \, @
- Password=my_password6 {3 c; m$ B' E5 }; u& f8 M' `# V4 u
- GetDriverFunc=getSQLDriverMYSQL# e5 {7 T; L9 l. j& j$ K
- VendorLib=libmysql.dll
$ i: i' u, N, ^. T3 ` - LibraryName=dbexpmysql.dll) ^( n W5 ~1 T1 _/ d2 i# D5 `
- Active=1; G$ f0 d0 ?. {+ q% a4 R
- ---example----
# x: A) g }/ n - - written 02.03.04 by pwk.linuxfan
6 F% p/ V* O/ D3 x3 T1 q% | Y - : a6 K& i& k7 g/ K( r/ s
复制代码 |
|