|
|
麻烦翻译一下,下面这段文章:xhan
0 @ h2 \( U& N2 {3 D( U# v& j# p6 x% ?; G
- ! K4 }& N$ P. ~- V! |# ?
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
7 E# l# c& Z& K; R* D" Z* v) y k
* q+ \1 V: f. C1 y' [3 L7 y2 e! D- ### What we need ###8 g+ `# c4 o- b* U/ m
- Naturally, we will need a MySQL server to store the data for us, this document 2 i- q( {: ^' A9 y: D" `1 p. o
- will not explain how this can be done - there are documents out there for the
8 G: _/ ~3 b* I - interested. The requirements include a (empty) database for TeamSpeak to use) H4 I8 ^& M0 s; o* v9 _
- and a user account (username + password) that has the permissions to do stuff! z1 j+ f' m5 N s) c# B1 ]
- with the database. Additionally, you will need a vendor library installed on the+ w' I" W) i/ {2 ^& H6 n
- local machine, this came with my MySQL install.; Q0 N; _4 X9 K4 v- [4 K% C' m! g
- These instructions will not tell you how you might transfer your data from the
y# E" }/ J" Y6 u) i8 \# \ - SQLite database to the MySQL database, we start with a clean and empty MySQL
! B+ E T+ n/ A- f2 f1 { - database.
: S3 w/ A( X# e5 n0 a - Some users have reported ways to import a SQLite database into MySQL, but at& O( I" [1 x2 f3 r& t
- the time of writing, there are still too many issues - check the current status
, @+ N+ `0 c |9 S& `% } - in the TeamSpeak forums if you are interested.; a2 s( M P( r( n' R6 {. R
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
0 Y6 p d ^9 L I" H4 [( c( q+ G" N - Borland was used. This driver can only interface with the client library that 0 C( s2 N! T) g
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
$ g5 G z+ P+ U( g# u/ Z - client library - basically all you have to do is to use a 3.x client library as
- A4 B" b% p. K3 T - "VendorLib" and a 4.x database to connect to.
( [* J4 L! ]) ^8 X" g3 s! ]3 I/ Q - If you need more info about dbExpress, you can contact Borland.9 R9 `/ H7 Q2 C& E6 `
- , z& A9 Q1 u$ D- t
- ### Doing the work ###7 v7 t5 Q6 O U, g6 m, r/ L
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
; {# i* D8 \ P1 A2 F4 [ - the perquisites right, just open your server.ini file, and add this section at7 C f% |) J+ F
- the end:
% V$ O% E! w3 D - ---cut here---
$ Y& P/ P0 S9 m - [DBEXPRESS]5 s) V- W0 y/ S" s7 l9 r+ P7 P. B
- sqldir=mysql_sql- J0 f$ u. O9 }7 T
- Drivername=mysql
+ C* y5 i1 r6 O/ S1 x8 U( I - Database=Your_Database_Name_Here
* @$ y: p. S( l" D2 e' q) r4 ^ - Hostname=The_PC_the_MySQL-Server_is_on
. {* I& k8 l) x0 P* d& N0 d9 I - User_name=User_name_on_the_MySQL-Server
0 |, l+ v( c. J: n4 ] v6 J8 `' Y - Password=Password_to_go_with_above_user_name/ R# a" I+ x6 s& m* [* H
- GetDriverFunc=getSQLDriverMYSQL9 J6 x& _, [$ V" p8 c }) p
- VendorLib=path_pointing_at_your_mysql_vendor_lib
; b0 G& ~$ o3 {0 ]8 H - LibraryName=path_to_libsqlmy_libary" p5 e) W3 R' _+ ]" v
- Active=1
( \, B) ^" `: ?$ K; X4 Y2 U - ---cut here---5 {) Q/ M5 ]% a6 r \3 S
- In my environment (a linux box with a MySQL server running locally) I have:2 ^8 r" p5 T* g# r
- ---example---% T9 u4 W8 X( h3 P& y8 @
- [DBEXPRESS], T5 L$ R( c% ?; G% F
- sqldir=mysql_sql
+ W/ \7 }0 _: s6 u - Drivername=mysql
7 u! _ z: @$ L - Database=test% B# b4 k# B/ p3 Z" R; [7 }$ d
- Hostname=localhost; W$ t0 Q8 `. _- _# l# i' C, m
- User_name=testuser( d3 D+ j! q4 U8 E# L: u: u
- Password=my_password! ^1 w: j# l; u% l( o
- GetDriverFunc=getSQLDriverMYSQL
* m' H8 c$ k/ H* J - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0- [- B2 ~* I" Y1 j3 K
- LibraryName=./libsqlmy.so7 W4 l) w) z Z% R% N! [9 R) f
- Active=15 I: M, |; z$ ^0 v: W! [4 d# c
- ---example---
/ q! J! W8 b- a, v - ; L( N+ S, c0 c8 D* q
- On a windows box, also running the MySQL server locally, it would be:
7 ~; W4 W0 e/ |& I1 `$ a - ---example---
4 @( O6 q5 A$ O. ]: ]" n+ ^4 ]* J5 D - [DBEXPRESS]
& u; ~: |( d( h) B. o! [8 G - sqldir=mysql_sql* h# [ B* K- f- h l
- Drivername=mysql2 ` x" h; h I h. C8 U, P+ B' {
- Database=test
& ^( r/ F3 F/ u/ p2 m; Z - Hostname=127.0.0.12 n1 a" K' |" A7 {# W, d
- User_name=testuser
5 n) q3 h% ?% i S: l - Password=my_password
6 a- }1 o$ F/ P' { - GetDriverFunc=getSQLDriverMYSQL& U7 G, M2 C5 J8 @. B' g1 }; b+ S9 } J
- VendorLib=libmysql.dll
0 K1 s, G& y2 B( I9 X& Y - LibraryName=dbexpmysql.dll
. J) ~* |1 j P. L. p' \ - Active=13 W/ E: v, F" i4 G' _, ^
- ---example----
2 ~( F( a4 V: X- G7 Y - - written 02.03.04 by pwk.linuxfan1 e4 @4 r# ?: s
$ v% V" |; E0 a- {( Y
复制代码 |
|