|
|
麻烦翻译一下,下面这段文章:xhan
! ~" I2 y, J9 p8 f f* L. _- j5 v; b9 ?, ~
-
9 L2 k$ g# T4 j g" h - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ###### M4 Q. S/ f' K
- % W- P4 m9 I/ n7 T* q. j) l4 O
- ### What we need ###
' `' ]2 l/ i# e; L7 j - Naturally, we will need a MySQL server to store the data for us, this document 7 o4 Z% j& W" @4 G- `% D2 ^; w
- will not explain how this can be done - there are documents out there for the
9 D" m3 K9 _/ m2 q( [6 r - interested. The requirements include a (empty) database for TeamSpeak to use
r( l, @2 b$ q) t! n - and a user account (username + password) that has the permissions to do stuff6 j5 k+ L2 e" n! K) a
- with the database. Additionally, you will need a vendor library installed on the& c% B) [( d1 M$ a
- local machine, this came with my MySQL install.
4 x. T, r. _) A# C* k+ v - These instructions will not tell you how you might transfer your data from the
1 G F- R! s: Y - SQLite database to the MySQL database, we start with a clean and empty MySQL
! o; V' B: e+ x$ W* B' ] - database.
6 c9 z* Q1 [: B3 a; X5 Z - Some users have reported ways to import a SQLite database into MySQL, but at
8 f& s5 b( V# o7 k* b, J - the time of writing, there are still too many issues - check the current status
) f" Z9 @6 f$ k - in the TeamSpeak forums if you are interested.( ^1 d4 \5 V# K4 i/ J
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
# c% e' t; @& G. F9 d - Borland was used. This driver can only interface with the client library that
' d0 b1 r G7 O. z - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
, ]% X( n9 I D, [" y0 ~ - client library - basically all you have to do is to use a 3.x client library as # M- G0 w8 A/ `* e5 ?" G7 A" J
- "VendorLib" and a 4.x database to connect to.2 u5 [5 l- ~6 Z5 E2 L& ^( F9 ?
- If you need more info about dbExpress, you can contact Borland.5 d! K1 k' f, j* P
- 8 I1 J, ~9 o# ]6 Z; M
- ### Doing the work ###
$ y4 Q! H9 u3 p; A, [ - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all) r% z# R. F7 @/ G5 N1 T/ d
- the perquisites right, just open your server.ini file, and add this section at
- i7 L- O" W. ]2 C& T0 ~2 p - the end:, x3 v# }# l, x
- ---cut here---( h+ _0 [: J* [6 N
- [DBEXPRESS]6 Y3 X! x5 ^1 e) r+ h$ l
- sqldir=mysql_sql
: [; H1 T- \$ O9 Z0 ~# Z! m- N( P - Drivername=mysql0 l# U; t" a% L2 F& Z! F* }: N
- Database=Your_Database_Name_Here ]2 E- R! }8 M2 j# y8 x0 k5 q
- Hostname=The_PC_the_MySQL-Server_is_on( B# _7 t3 {, G
- User_name=User_name_on_the_MySQL-Server% J' N6 ]) f" S! ? k9 g5 _2 \
- Password=Password_to_go_with_above_user_name
6 h1 w6 V/ J6 {6 j% C* ?* U# a - GetDriverFunc=getSQLDriverMYSQL
# }' p8 u3 G7 x - VendorLib=path_pointing_at_your_mysql_vendor_lib
# l9 o2 I/ B3 ]' E1 R! i- N `- J; H* Z - LibraryName=path_to_libsqlmy_libary
8 t4 y5 Y3 @7 [8 w - Active=1
$ V) \! o3 c" U/ w% ^: l5 ^' C% ^2 A - ---cut here---
) Y% M/ r' ?! \% l - In my environment (a linux box with a MySQL server running locally) I have:+ q5 b2 P( }* K- p
- ---example---
) N% E) |0 [" H7 H8 T' [7 W9 I - [DBEXPRESS]
2 Z2 C" ~0 M- |( X0 N$ G - sqldir=mysql_sql
. P+ {1 c" g# P2 i4 x8 k K6 m2 @( h5 X - Drivername=mysql" k7 s) ~* G: W/ [ g
- Database=test
7 p# z! X; {4 u& R, c. ~' Y - Hostname=localhost( U* Q) r% h, f5 S+ z9 u0 j
- User_name=testuser
2 g" U+ G7 t o" T6 S - Password=my_password+ j# F" K" e5 I0 Q
- GetDriverFunc=getSQLDriverMYSQL
/ A" @( k: X+ P8 R% L) q; `4 G - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- l6 V p0 U" k& _) n( J - LibraryName=./libsqlmy.so* L2 S! P; X' e1 o" P; L
- Active=1% ~' m. [0 B8 t8 y
- ---example---
+ U$ c1 U+ n- a! c
4 v; |0 Z) e: q* }. l& x) q* s- On a windows box, also running the MySQL server locally, it would be:
% i! @/ d8 P! f" ]! f0 E$ R9 a - ---example---2 _2 B; ~# w4 G9 s l! E9 ?" c
- [DBEXPRESS]/ h/ V `7 y4 v% ~$ _& K
- sqldir=mysql_sql) s* [7 k% k' H) ?8 k9 x& d
- Drivername=mysql6 G1 W# ?" w3 O, ~. n& p ^! g/ x
- Database=test9 a7 M2 b# |4 g0 O% @! c
- Hostname=127.0.0.1
! R" a% g$ E# p3 I; k' H) k0 M - User_name=testuser4 Y7 ?1 U3 j' p
- Password=my_password
8 R$ T& L* I4 N- |- _ - GetDriverFunc=getSQLDriverMYSQL
1 `$ x+ h0 f H8 c4 {8 @ - VendorLib=libmysql.dll; @' t0 p& u/ b0 o8 M! F. x
- LibraryName=dbexpmysql.dll
5 f, J8 @& ^6 Y% g - Active=1
2 k" \ u1 \, ~( I9 I4 I0 k7 H* c - ---example----6 [' _9 M+ X% }( T
- - written 02.03.04 by pwk.linuxfan
( x# x3 H0 M# f6 F) P - 0 ?" o. z* k: P5 C3 l6 W9 ~7 U3 m3 ~4 k
复制代码 |
|