|
|
麻烦翻译一下,下面这段文章:xhan 5 O7 c3 W9 B' o; J+ E* d
( Y9 k; Y+ x% {4 _. M- ( U% e' m5 l$ [( C& W* i" K/ b+ a
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; f# E8 W' g4 L, T5 r
- 4 W5 M, g2 ~1 G& ~' @, f! ~7 z. j" T% }6 u
- ### What we need ###
; r P, |- l- w# M8 ? - Naturally, we will need a MySQL server to store the data for us, this document , _7 z' M( T, Q: I& h$ Z: d5 Z
- will not explain how this can be done - there are documents out there for the 3 e% q# M) ?% E A+ F' a% o7 `
- interested. The requirements include a (empty) database for TeamSpeak to use6 a3 p8 L7 i8 }0 Q+ U) O; [( l
- and a user account (username + password) that has the permissions to do stuff9 P4 ?4 H9 X/ e2 T
- with the database. Additionally, you will need a vendor library installed on the: F) [ S/ m( u
- local machine, this came with my MySQL install.- i, ]8 I! e% |& Q# l+ n6 G
- These instructions will not tell you how you might transfer your data from the8 Z. r# ? H* P9 g, {; n
- SQLite database to the MySQL database, we start with a clean and empty MySQL4 C `' d* H. E8 q2 Y0 @) l3 S
- database.
& q9 A' ?0 S6 u/ \3 A; F& a5 ? - Some users have reported ways to import a SQLite database into MySQL, but at, Z% y8 P$ X" m& ?3 y7 X
- the time of writing, there are still too many issues - check the current status
& Z! u+ t2 O& |0 N8 w) I. G - in the TeamSpeak forums if you are interested.
! g6 [7 j9 W$ d5 u6 U& A1 y9 i - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from, Z, R2 i( P! M) K
- Borland was used. This driver can only interface with the client library that
: A2 o4 v* X! j9 u, j! O - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this$ S5 V- ^+ @/ W$ E$ R& q* r
- client library - basically all you have to do is to use a 3.x client library as
4 y3 y1 H( E; e* l- e - "VendorLib" and a 4.x database to connect to." a4 X2 B1 ~( k- V- v" s/ V
- If you need more info about dbExpress, you can contact Borland.0 s0 X2 A+ M! s+ j
! O! G1 R8 `7 W- ### Doing the work ###1 A8 W0 N1 K! S: p
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all! t" y8 Y8 R* W8 B
- the perquisites right, just open your server.ini file, and add this section at$ C; I$ V7 E1 B. u2 k
- the end:
( [- r# Q# G" m; x* \ - ---cut here---
1 @# s3 I/ z. A5 @) o: B- B Z4 B. T - [DBEXPRESS]* ^8 y; r9 ?6 ?4 s
- sqldir=mysql_sql
4 u! N, I; T: x3 Q" ? - Drivername=mysql, J2 {. Z/ g0 Q) {2 ]) H0 X' N
- Database=Your_Database_Name_Here
" ]7 b3 R/ A: c - Hostname=The_PC_the_MySQL-Server_is_on
- r% Z' D5 f5 r1 f( M' f7 N - User_name=User_name_on_the_MySQL-Server
9 X% A: R5 |: h+ _: Q* n - Password=Password_to_go_with_above_user_name
6 I3 z7 M. [$ Z, F - GetDriverFunc=getSQLDriverMYSQL
. H; W' H, e- S" q. C - VendorLib=path_pointing_at_your_mysql_vendor_lib
2 J& D/ P9 ?5 H6 y - LibraryName=path_to_libsqlmy_libary2 C9 g5 n: ~: D
- Active=1$ G5 a k2 J( Q: b$ w) e
- ---cut here---
5 m) l! {( L5 c# a - In my environment (a linux box with a MySQL server running locally) I have:
d7 r F. O4 P0 M- D+ W1 n. D - ---example---( N; a1 h3 P( @: w/ z
- [DBEXPRESS]
% N- w, `6 m D: D6 L3 R" J - sqldir=mysql_sql) R0 N# B# c% L8 P0 m. _
- Drivername=mysql
* v2 i/ _. H. z# u - Database=test
8 [1 V) b+ c' l8 a4 a! y - Hostname=localhost0 `5 V- {+ e/ l2 O9 T4 U
- User_name=testuser
' G- u) w& G1 ?( a - Password=my_password
/ o- c. \- v0 x v, |% k - GetDriverFunc=getSQLDriverMYSQL
# A# G# R5 ?: } - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0( n4 C( ^' X$ S8 H6 H
- LibraryName=./libsqlmy.so/ |- K! s5 B, _% w
- Active=1# Y" I! I0 L* `# p8 g U
- ---example---
9 w3 L$ s. y' P - # y3 a% r! @; Q' J
- On a windows box, also running the MySQL server locally, it would be: J% o" _0 A. x; k8 \: ^# U/ S
- ---example---
; J* t# a0 O1 L - [DBEXPRESS]
$ q6 [% I5 |8 C* ^ - sqldir=mysql_sql
! B$ u$ }7 S! j9 i N - Drivername=mysql
8 H# j* M+ V0 O" y, f+ U - Database=test
+ ]0 c5 H% g; g5 c. p - Hostname=127.0.0.1
- G! p2 w# y J- j7 C/ O3 Y - User_name=testuser- W: X. K) N/ } ]- [
- Password=my_password
& A& b+ k/ \# B - GetDriverFunc=getSQLDriverMYSQL
5 m _$ p9 X0 o- J - VendorLib=libmysql.dll
5 S- H4 _* G8 C$ M- P - LibraryName=dbexpmysql.dll
& v; e; e9 c+ |$ ^( |* f - Active=1; A5 J4 ~2 Z* [# G6 M
- ---example----2 J, }( B0 C7 }: @7 W
- - written 02.03.04 by pwk.linuxfan
( P9 U& B/ @. Y- M5 i" b
$ n) N L4 u' Z
复制代码 |
|