|
|
麻烦翻译一下,下面这段文章:xhan 0 X6 ^' P0 D$ f4 C& l- Y+ S/ z
1 Y, G8 c2 I, p3 p! M2 n
- % Z, o l3 A1 ]8 x
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######6 G0 O/ O; R5 e. y: v+ U2 O- G
4 `, \- _1 ]0 o- ### What we need ###7 C% R# u# {3 L
- Naturally, we will need a MySQL server to store the data for us, this document 1 d! E, ?. Y: ?
- will not explain how this can be done - there are documents out there for the 6 ~0 L6 P4 ]( x V( P
- interested. The requirements include a (empty) database for TeamSpeak to use' L7 d' }4 ?4 c5 Y
- and a user account (username + password) that has the permissions to do stuff) C: L! h$ M6 w8 Y
- with the database. Additionally, you will need a vendor library installed on the6 q' S( K6 R4 t
- local machine, this came with my MySQL install./ }% L0 q: m$ `# f c ~ h
- These instructions will not tell you how you might transfer your data from the E: H: g/ M5 F. I! K
- SQLite database to the MySQL database, we start with a clean and empty MySQL6 X9 M# A& x" k0 K3 f# I
- database.; Q) i5 r* P* x+ ^/ X2 `4 `
- Some users have reported ways to import a SQLite database into MySQL, but at
/ ^+ Q8 H! `- }1 x, k - the time of writing, there are still too many issues - check the current status
# w3 \/ s' `2 a5 I$ e - in the TeamSpeak forums if you are interested.) u6 j2 L8 H- N6 b0 e1 f1 {
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from7 G, N' L' X) N: P; P8 |4 T
- Borland was used. This driver can only interface with the client library that
; {# w' j- `0 e- a - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this# r6 e* P1 I$ D; b: X+ R/ @# `
- client library - basically all you have to do is to use a 3.x client library as + ^1 b5 [2 w7 K5 W& z' m
- "VendorLib" and a 4.x database to connect to.7 h0 \2 U b1 p! `9 ]$ J
- If you need more info about dbExpress, you can contact Borland.% E! C. z5 a5 k& @! t6 x+ j
! h9 c e0 Y S2 h7 j% i$ C/ ~ a- ### Doing the work ###- N6 x- q5 P) _; l
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
! ~( p( O6 k, r2 H1 e0 h! Z - the perquisites right, just open your server.ini file, and add this section at
8 E; Z3 e+ b1 Q) }* G - the end:
9 {$ K" Q: ], T) ] - ---cut here---
8 p2 w' {; ^! W/ q - [DBEXPRESS]
# ?2 \+ q- g& c7 T$ l - sqldir=mysql_sql
- W8 q6 a0 C; D2 ]8 J8 F - Drivername=mysql% r" r2 ]6 z, p, O/ L0 y1 M* X2 X: M
- Database=Your_Database_Name_Here% G+ A% v- O; Y+ }( s! @
- Hostname=The_PC_the_MySQL-Server_is_on
+ ` O! N- f- O, W" { - User_name=User_name_on_the_MySQL-Server
P3 h! A# O+ l. T& C% f - Password=Password_to_go_with_above_user_name
& ~- _: v, y& a" z" ^8 M - GetDriverFunc=getSQLDriverMYSQL
8 y. l$ \" s y3 G3 j% s - VendorLib=path_pointing_at_your_mysql_vendor_lib& }7 h4 p/ Q0 f4 _' o- |
- LibraryName=path_to_libsqlmy_libary
. t/ Z; ]! b3 u2 T& p1 o4 @ - Active=1
0 h% P4 L/ S3 K - ---cut here---
# ~3 U& D6 Z, f s2 v, K+ ^1 o - In my environment (a linux box with a MySQL server running locally) I have:
0 S5 A$ ~7 O D - ---example---+ Q3 _* T- ^1 [) Y
- [DBEXPRESS]
1 n1 k% Y1 ]1 a5 |3 O - sqldir=mysql_sql
8 X8 z6 W% x n - Drivername=mysql" X4 p5 q3 h& {: q
- Database=test& ~( B' S' S7 {2 ?* A7 P3 Q/ m( y4 O; |$ R
- Hostname=localhost
# r- J% U4 Z+ @: n! H0 P - User_name=testuser! Y+ P" I: C* z/ P- l; j+ i `
- Password=my_password
6 O/ {$ \ X8 v8 \; b X - GetDriverFunc=getSQLDriverMYSQL
$ K; i9 d3 V7 Z9 H+ y7 K5 V4 T0 I+ j - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
: K9 g2 s* \% V* V/ `% c* |! A - LibraryName=./libsqlmy.so
8 c$ j* E9 D0 n* C7 ?: p8 r! l - Active=1' Z6 s+ H* A, ~7 o1 v5 d
- ---example---2 G6 L! P$ p0 T
- 2 q6 ~0 x, F4 U K8 q+ r
- On a windows box, also running the MySQL server locally, it would be:& L( ]# c* f7 s3 ?
- ---example---
2 p4 E) s T# h - [DBEXPRESS]
% f9 n7 J: f' B2 d6 |7 }) N9 N- ]4 b" A - sqldir=mysql_sql- u5 U- s( G$ y
- Drivername=mysql. j; L8 L6 f; T1 [ x6 @
- Database=test
8 \$ Y$ H5 I* O2 j8 S/ V# ^0 f - Hostname=127.0.0.1) b4 d! @ q4 y4 j- R# a. u7 a! L
- User_name=testuser
; o6 i# j3 L- j7 r3 H- Z% p - Password=my_password; A% `* f; F7 I2 A1 F9 R" {
- GetDriverFunc=getSQLDriverMYSQL
7 F5 A( b7 t I% R0 g; X! S! x - VendorLib=libmysql.dll
/ m# F7 }& H2 @/ q' r# } - LibraryName=dbexpmysql.dll
5 W7 H. w0 x/ ~' S/ B" F8 ~ - Active=1
3 q3 p' D' K' r+ ]- x" g; s - ---example----, n3 g5 G& J! f9 u
- - written 02.03.04 by pwk.linuxfan
0 `1 P9 T& c" _ - $ n N7 \2 q# U$ f
复制代码 |
|