|
|
麻烦翻译一下,下面这段文章:xhan
7 i$ b: i+ I! X2 t8 Q/ [, m
3 A b4 i' `! p0 b! {4 n) k) w* `- 7 S$ O6 C7 y# L/ g+ y& {( p
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######( m7 q9 } V% Y* |5 H
" N( J1 N" H2 e0 t- ### What we need ###4 t* ]1 \; p, e) V7 _
- Naturally, we will need a MySQL server to store the data for us, this document . b; E1 V( Z0 p: ?' _! q9 @) F
- will not explain how this can be done - there are documents out there for the ' M2 k5 w$ S% A5 T1 O% R/ J
- interested. The requirements include a (empty) database for TeamSpeak to use
6 \& h0 K% ~- c3 ?0 b# m# _$ N - and a user account (username + password) that has the permissions to do stuff2 c2 f8 b' B+ d
- with the database. Additionally, you will need a vendor library installed on the
: A# ?/ S' Q' l# z1 g - local machine, this came with my MySQL install.0 o; ^/ b0 n# M2 f" {/ G% L9 C: _4 i
- These instructions will not tell you how you might transfer your data from the6 [) p, Y1 ~; m% H! z
- SQLite database to the MySQL database, we start with a clean and empty MySQL2 I: f' N0 q H3 R% I
- database.7 z; h8 Q) m. t3 ~2 ^: y1 ~ d! l' |
- Some users have reported ways to import a SQLite database into MySQL, but at
1 C& `7 e9 e/ U! k4 |9 ? - the time of writing, there are still too many issues - check the current status2 |/ l1 U }3 L2 C
- in the TeamSpeak forums if you are interested.6 E% x2 _$ s: v) s% {( f3 V
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% e' U6 o/ a0 N/ y2 g! M: }. y4 | [ - Borland was used. This driver can only interface with the client library that 7 @5 L# c6 J' j) Y5 s( w6 ^, Z( G
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, _( D5 f, ^* \1 z$ p$ D* A9 L
- client library - basically all you have to do is to use a 3.x client library as
3 h) c3 c1 z( B& Q0 r+ j - "VendorLib" and a 4.x database to connect to.$ A) ^. {' w% | s0 L% i1 M
- If you need more info about dbExpress, you can contact Borland.
/ g5 w7 X! O Y0 ~6 p8 | - , l' T' O: I% ~" g7 w' b
- ### Doing the work ###
& Q# a. N5 h" o5 l2 C - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ c: W+ d! W+ h" ^- M( q
- the perquisites right, just open your server.ini file, and add this section at+ j- [. U2 q7 M+ W: p# @: j
- the end:
; w& x! a- i/ {* X. g3 c1 E - ---cut here---5 O, C6 g9 O: M) E$ t( Q
- [DBEXPRESS]& i) L8 n/ C& i; ?) O6 N
- sqldir=mysql_sql
6 a1 y" p! i( W+ b& f - Drivername=mysql( i1 B4 {* r) v# E! w3 ~ {
- Database=Your_Database_Name_Here
3 f! a4 e2 [! g. g4 E& i4 Q. S - Hostname=The_PC_the_MySQL-Server_is_on
) u( K/ X' G" E4 }( w I: f - User_name=User_name_on_the_MySQL-Server
1 `0 `- z m2 a8 F4 |% u. y - Password=Password_to_go_with_above_user_name
5 ]7 _3 R8 R9 d X7 e: n - GetDriverFunc=getSQLDriverMYSQL$ V3 j+ b' D- W+ e9 ^& B0 ~
- VendorLib=path_pointing_at_your_mysql_vendor_lib4 I# u7 y+ W B2 o: g$ D
- LibraryName=path_to_libsqlmy_libary" N. m7 _/ D7 I" o5 \
- Active=1& e0 {6 ? e. g; }) ^1 I4 F. Z
- ---cut here---& y5 Q% o4 z9 i. g5 J( V# r; N9 T
- In my environment (a linux box with a MySQL server running locally) I have:" a8 ]5 Y) R$ h2 T# D, j
- ---example---+ a. e a+ a/ u4 h
- [DBEXPRESS]% b6 q3 v X/ S8 G# r, [
- sqldir=mysql_sql' t6 [) @% {+ r: S" t
- Drivername=mysql: q) y3 k/ V% H1 W. E
- Database=test ]$ A5 Q2 Y3 J. l" c# e1 w' G l8 ^
- Hostname=localhost
7 q) ?3 N7 j, R' } - User_name=testuser" w0 @7 @4 `3 k/ t/ d( w" P5 z
- Password=my_password1 J# Q+ y4 p% m# _
- GetDriverFunc=getSQLDriverMYSQL" E, ]- ^5 ^( g `
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0 @+ ^9 k, G7 K r* k6 ]
- LibraryName=./libsqlmy.so
% y; `) W7 d8 G - Active=17 W: M8 F- L( D1 c/ t. x
- ---example---0 y% n+ r4 b- H& y* A
8 T# B! f& a! Y) _- On a windows box, also running the MySQL server locally, it would be:* t/ [1 {9 i8 F: B" C2 o5 D
- ---example---
. {3 G2 [4 ? e6 g - [DBEXPRESS]( c2 c6 ~/ s7 `0 w1 z2 e
- sqldir=mysql_sql
1 j: m+ h7 t; d+ y0 y - Drivername=mysql
. ?1 m. I' q0 p" T - Database=test
. U6 Y6 u `' ^! D( m7 J! H - Hostname=127.0.0.12 t( E6 `+ l1 J8 m/ t. ?3 j
- User_name=testuser: \/ u/ J5 X( q+ w( B a
- Password=my_password
0 x$ a& d: Y: u. R - GetDriverFunc=getSQLDriverMYSQL, V) g* \/ }) K0 x5 X3 j
- VendorLib=libmysql.dll
\ K$ N1 d1 _( C& Q! J - LibraryName=dbexpmysql.dll# p! e; N5 n* h/ j0 W9 v/ q
- Active=1
1 ^ n. O& X2 A& k0 m - ---example----3 Y& ~9 y9 w. Q+ ~# b
- - written 02.03.04 by pwk.linuxfan
' Q( D/ m2 ]& b. N
) g8 X( y' c$ b5 F% d& p+ Q( `
复制代码 |
|