|
|
麻烦翻译一下,下面这段文章:xhan Z0 P! j+ e# Y$ S- e
' e1 j6 L. M& ~! |5 O
-
% J0 t- k) T5 b+ h# A - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######8 H- O! s0 r4 Z% Q9 o/ H1 l& K* s( p
- ; a6 o' V" P/ W- {
- ### What we need ###
( _% H: I; A \1 c' x, s - Naturally, we will need a MySQL server to store the data for us, this document
5 V: y. E+ q+ Q; ]- z( y - will not explain how this can be done - there are documents out there for the # I& c) v. S$ B
- interested. The requirements include a (empty) database for TeamSpeak to use
' `1 W; u9 X6 w - and a user account (username + password) that has the permissions to do stuff* o4 u/ T- X9 H( O& |
- with the database. Additionally, you will need a vendor library installed on the( j2 q3 u6 d5 Z9 y5 r2 v1 Y
- local machine, this came with my MySQL install./ |6 C; p+ ]2 N T
- These instructions will not tell you how you might transfer your data from the: N: R0 Q) ^0 T. v, |* i
- SQLite database to the MySQL database, we start with a clean and empty MySQL
2 d0 G7 d6 G1 l1 F: u7 ]4 {" ^ - database.& M0 T8 V" S+ L' P9 c" q
- Some users have reported ways to import a SQLite database into MySQL, but at
4 {0 S1 d# @' u* } - the time of writing, there are still too many issues - check the current status
& t8 w' U( ]' T6 u H - in the TeamSpeak forums if you are interested.0 M) J9 [. C, t/ l3 ?
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 w. {6 \' w/ J$ m7 L# L# p - Borland was used. This driver can only interface with the client library that
0 m4 z+ d! g8 p" p! r - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this" H( x5 M& \ S2 ]" N7 a
- client library - basically all you have to do is to use a 3.x client library as
3 b3 y8 ]; a+ Z) |, ?7 y, D# y" b0 A - "VendorLib" and a 4.x database to connect to.
3 Y/ |% }% s6 z& S - If you need more info about dbExpress, you can contact Borland.
h8 {+ U5 y0 T H# ^ - 4 `' ?) L( H2 A, i _
- ### Doing the work ###! @! V2 W- I2 N. i! v9 w
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all/ n5 y; x) F( b$ L0 V: L- y2 |
- the perquisites right, just open your server.ini file, and add this section at
; H1 m/ \3 C! Y4 s - the end:7 ] f+ ^% @; z% f% u
- ---cut here---
0 D/ a' }3 j* {6 l( g- S - [DBEXPRESS], Y4 g7 ?; C% n7 y) g8 a7 D+ L
- sqldir=mysql_sql
5 M; _9 @/ e" t. t - Drivername=mysql
1 X: Z7 j1 | @9 a" P/ D - Database=Your_Database_Name_Here( P* E2 P0 o- N
- Hostname=The_PC_the_MySQL-Server_is_on
* ?3 S5 u1 C6 ~% Y4 b - User_name=User_name_on_the_MySQL-Server% w: A& n, X) m, C: h$ r [
- Password=Password_to_go_with_above_user_name4 \2 I' M ^* L1 r: b2 [# p3 d
- GetDriverFunc=getSQLDriverMYSQL
5 W( C- I: O9 |4 D/ M5 W - VendorLib=path_pointing_at_your_mysql_vendor_lib
8 h; z5 K) s# Q9 O4 a - LibraryName=path_to_libsqlmy_libary& l9 d, Q. Z* R4 f( ^# K% t( K7 J
- Active=1% A0 Q- s( k6 n3 H A; ~
- ---cut here---
1 g' F r4 }0 H$ |, g - In my environment (a linux box with a MySQL server running locally) I have: {; _. D' ^7 a# n, y/ F) K7 e
- ---example---
; y. @1 t9 C6 ~+ y5 L4 d - [DBEXPRESS]& W8 `7 H4 T- m) }
- sqldir=mysql_sql
7 Y1 {& _, t; Z$ P/ L - Drivername=mysql4 K z0 q$ R4 {2 D: T
- Database=test
- b! `& H) S1 u; v5 F, T) W - Hostname=localhost* K7 |9 r. S* B/ _$ H: r& N( s
- User_name=testuser
5 j+ K- H. r% @9 X8 C - Password=my_password$ Z) j( D3 I/ n: P7 O
- GetDriverFunc=getSQLDriverMYSQL9 h, b) X/ c- k2 \4 n& ] r
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
9 N/ b5 m% j U0 A - LibraryName=./libsqlmy.so
" K) }4 G- u; O1 d4 ]$ G) ` q - Active=1
& u( U- ]% c6 ^ - ---example---0 V! T( `5 e& {. @- q
5 n- F. w0 g; c2 C3 h4 o1 D- On a windows box, also running the MySQL server locally, it would be:
! x! n4 ^# z% E' t9 y - ---example---
) H* g$ S; H; ~9 g* v [ - [DBEXPRESS]1 |6 E: w% Y/ D5 E) p
- sqldir=mysql_sql
- }; X" M V" B; u - Drivername=mysql
5 g8 Z# N! I. T1 Z" K, I - Database=test S0 y+ | g/ N ~% I
- Hostname=127.0.0.1& f- V3 L! ^9 k- ^$ M
- User_name=testuser
0 ]" G) `4 M0 l7 y - Password=my_password' ~. O. c8 {. b3 n6 ~) I8 g0 t
- GetDriverFunc=getSQLDriverMYSQL) E6 {6 w- J3 _
- VendorLib=libmysql.dll# _8 ?% f% Y! H9 a- g
- LibraryName=dbexpmysql.dll
8 o1 w; d( v' n0 z) E7 h) M6 @ - Active=15 \/ Q( l8 L3 D% w$ \
- ---example----) P( T; k4 s l$ u/ s
- - written 02.03.04 by pwk.linuxfan" Q# g- A# ~- l2 {; L
- # S: @" d" y: X d
复制代码 |
|