|
|
麻烦翻译一下,下面这段文章:xhan
+ [0 W# B) n' F; Q, {9 E# |& [& t, ^9 O( p+ G" }
- ' T0 D0 W* D- k1 \4 C- R1 ~
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######$ V$ f9 K# }, g9 H0 v8 S
- - B. f7 v- A. q
- ### What we need ###) ~0 O! A( Q% k7 B( S5 E7 {& |
- Naturally, we will need a MySQL server to store the data for us, this document # ^- `2 Q" A3 q; M" n
- will not explain how this can be done - there are documents out there for the
$ ]' M* K' a) S - interested. The requirements include a (empty) database for TeamSpeak to use
" g h" p0 S/ r- `/ B2 D - and a user account (username + password) that has the permissions to do stuff: V. [( q8 S+ ]+ e |$ w4 W+ m0 ]7 `$ F
- with the database. Additionally, you will need a vendor library installed on the0 Q' g" j" y* I% o8 z1 ]2 F
- local machine, this came with my MySQL install.
5 H/ E1 p: R, R$ [0 R - These instructions will not tell you how you might transfer your data from the
2 z# c0 F- x6 b2 R# I+ Q - SQLite database to the MySQL database, we start with a clean and empty MySQL% t6 p( k% w: Q
- database.* V% @+ g, Q) A3 C" R
- Some users have reported ways to import a SQLite database into MySQL, but at2 L. F6 H9 ]0 r2 t3 c
- the time of writing, there are still too many issues - check the current status0 S, U. ^0 W6 e% B! Y# C* y
- in the TeamSpeak forums if you are interested.
/ m8 m0 a- e( |, v/ H2 b3 x - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from; q- U0 I) H, I6 a1 E6 d
- Borland was used. This driver can only interface with the client library that
, k+ j$ s' ]9 _' k4 w - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
8 o, [5 ]1 X+ d- J5 v. P) S - client library - basically all you have to do is to use a 3.x client library as
6 Q9 I! b" h6 J' u6 u+ W w+ m7 X: [ - "VendorLib" and a 4.x database to connect to.- [% y) R/ e$ g: h' L# C
- If you need more info about dbExpress, you can contact Borland.! [$ k4 L0 }8 u1 Z
- 4 W0 J0 W* j+ u; N1 u
- ### Doing the work ###
; @9 s5 ?6 x+ e5 c ^( d - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all, U) M' F) H) s8 h. k* |
- the perquisites right, just open your server.ini file, and add this section at
1 r0 ]4 ~$ D2 S0 A( b# [ L - the end:" [+ {- n% `3 l T: t
- ---cut here--- a3 F `9 W9 V+ h @' N
- [DBEXPRESS]
Z$ Y4 p2 F8 m+ t& K0 Z0 f - sqldir=mysql_sql
9 I8 ?1 `- E2 |0 K" c# U - Drivername=mysql' T# ^" C) G5 O1 E, a
- Database=Your_Database_Name_Here
, p8 U( _1 ^/ a) S4 ] - Hostname=The_PC_the_MySQL-Server_is_on
8 R0 k9 d: H& I% l - User_name=User_name_on_the_MySQL-Server
! ~( T3 S1 z1 n - Password=Password_to_go_with_above_user_name
1 ~* X# h* a: F; x6 Z$ h9 T - GetDriverFunc=getSQLDriverMYSQL
; b/ u8 ?/ c* V7 g! }0 V - VendorLib=path_pointing_at_your_mysql_vendor_lib6 H4 R, g% F$ S# ?
- LibraryName=path_to_libsqlmy_libary0 D9 D( }* L! l* t V; b& F5 {
- Active=1
; P. B# A9 h( b8 o! X) r0 J - ---cut here---- C! [) w& M( m. X& k
- In my environment (a linux box with a MySQL server running locally) I have:0 }7 T+ k7 n7 k$ V, f% z4 p
- ---example---* d `" K' W, q
- [DBEXPRESS]
% o K, G- _% J - sqldir=mysql_sql& W0 n! _! Z6 {3 K! z6 T( h. ~
- Drivername=mysql8 y3 _: e0 |* @' k; \% \7 [' @
- Database=test" M. I' K+ ^1 h* E
- Hostname=localhost5 Q, a& R2 g, P! G0 G9 M
- User_name=testuser
) r' {" V5 m% y8 m% ~ - Password=my_password/ n! M/ b/ a7 j6 H1 A- E+ T
- GetDriverFunc=getSQLDriverMYSQL- ?' Z F+ n% z( ?9 G7 J
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
, l/ E! |" P+ n/ H. {3 O% E - LibraryName=./libsqlmy.so
0 y7 j+ ]3 P5 v - Active=1
3 F8 ]) O* o2 v" l - ---example---
3 h) s) v: I: Z- j* _( v0 r - * G2 I4 b ~& K) M- h, W$ u7 Q* b/ m4 h
- On a windows box, also running the MySQL server locally, it would be:
2 u* h$ q9 d) |' Q - ---example---
% ~! l" i0 u T; U/ @8 \( m$ U - [DBEXPRESS], U) X, ]# O r" {8 d7 s4 F3 m
- sqldir=mysql_sql& A2 _/ n" C9 A- Z" u$ G8 D
- Drivername=mysql
* ?) O4 c$ g5 \9 L, v8 h* l8 K - Database=test! ~. ~" Y. g+ S; ~& ` K/ n
- Hostname=127.0.0.1! F- T1 N [0 P8 a$ T3 a
- User_name=testuser
% C V7 w1 G6 f2 A+ i1 B - Password=my_password3 v; \: y8 ` w* c1 J5 L# K
- GetDriverFunc=getSQLDriverMYSQL
2 Y3 ~) J8 b9 [6 O - VendorLib=libmysql.dll
2 p& c) p1 \" g3 C+ |2 Y - LibraryName=dbexpmysql.dll( D0 N: p( J f( ?
- Active=1( O- `* R5 O: T7 ]# S
- ---example----9 G. ?9 t$ Y% B- M
- - written 02.03.04 by pwk.linuxfan
* S" }/ M/ b, ^. {& v" _ - , Y9 \% E0 b" F I
复制代码 |
|