|
|
麻烦翻译一下,下面这段文章:xhan 3 r$ R [; ]3 a- l
" g1 H$ T; w6 w7 E
- ( Q' O( G, V. l
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######; f% Q1 ?9 z- ~
9 H' q/ f6 [& T( R3 B- ### What we need ###
$ H1 R* Q( X r/ [( c - Naturally, we will need a MySQL server to store the data for us, this document
& o8 R+ L p9 K - will not explain how this can be done - there are documents out there for the
# I6 K- X3 ]/ f0 S" m9 e. } - interested. The requirements include a (empty) database for TeamSpeak to use
( I n* {# X& @' ] - and a user account (username + password) that has the permissions to do stuff
! Y' L$ K2 G! ~# {7 y$ r; C - with the database. Additionally, you will need a vendor library installed on the
, b; w$ p6 i d6 o - local machine, this came with my MySQL install.
; P- D5 ~2 ^: H# \0 n - These instructions will not tell you how you might transfer your data from the
& C. F u2 I& u% {( i9 J, | - SQLite database to the MySQL database, we start with a clean and empty MySQL8 k `; T+ j% z( y1 {% H8 N
- database.
. i$ h3 v! [" K: ], D' o - Some users have reported ways to import a SQLite database into MySQL, but at
9 u& o9 J- D! [5 @# U7 d! u7 w - the time of writing, there are still too many issues - check the current status0 j7 o2 o, n* q5 x" Q
- in the TeamSpeak forums if you are interested.
2 b" h* Z- E% G& U e - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from0 `% ^9 g! N) x* k6 u* i6 B
- Borland was used. This driver can only interface with the client library that # ^, ?$ p4 k7 l# S+ q$ F8 H3 P
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
1 L! p! X( F `1 ?' e* O0 z- X - client library - basically all you have to do is to use a 3.x client library as 3 H# x t3 ^" H9 Z
- "VendorLib" and a 4.x database to connect to.
& O1 k1 W- U p* e" d4 n1 i - If you need more info about dbExpress, you can contact Borland./ Z5 \! p5 O% N* B
- 4 Q0 R1 o, Q% r, k5 h) ]8 C$ @$ M
- ### Doing the work ###
) ~- W" e* j' g0 r' {% l! F - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
4 y; @6 \/ H { J& v% J - the perquisites right, just open your server.ini file, and add this section at4 d# {. s9 _0 P. W5 w
- the end:3 M5 u+ p+ c% f0 V1 {% v
- ---cut here---6 f9 v& X! a6 A# e/ a: c/ K
- [DBEXPRESS]" b& [' j5 I1 m1 h _$ K
- sqldir=mysql_sql
6 l+ c$ M+ E3 g" J; P6 G" b - Drivername=mysql& S8 V8 [4 @, f; ] }
- Database=Your_Database_Name_Here
8 q8 o- f7 M" x$ w+ \5 V - Hostname=The_PC_the_MySQL-Server_is_on* u( \3 ^2 p& P- ^) j+ M1 q, a) t
- User_name=User_name_on_the_MySQL-Server
, l3 U' D! A0 Q" B - Password=Password_to_go_with_above_user_name
' P7 Y1 ~7 q3 B0 r. q, ] - GetDriverFunc=getSQLDriverMYSQL
2 z+ J0 C. C8 V2 L2 b0 X; u - VendorLib=path_pointing_at_your_mysql_vendor_lib( i* |. W- ]: K4 `( D
- LibraryName=path_to_libsqlmy_libary
5 Z* l) Y1 m$ b/ f3 H/ j z! A - Active=1. w: W3 R, h0 r N2 Q* {
- ---cut here---: k8 D; T# H, y; k* c
- In my environment (a linux box with a MySQL server running locally) I have:7 l# s* x' x9 Z0 Q5 F) S E
- ---example---
9 t) `! ` C" i9 w9 j - [DBEXPRESS]
. t0 x, H: ` P' r- y) s: f: ]+ C, d - sqldir=mysql_sql
' Y d3 r+ w! c9 f% O. K; o; V - Drivername=mysql
, Y) ?- p* w% Z3 U+ W3 k( k1 b - Database=test% I1 [! D' o C w8 j. f# E
- Hostname=localhost0 }2 Z" z y, }& y& [# l, Q0 @
- User_name=testuser
3 `9 z% y& l7 @7 G& A! f; r" A - Password=my_password
4 q8 B% f9 K' }$ l - GetDriverFunc=getSQLDriverMYSQL
( Z0 E. X# b+ x$ p3 F - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
' V; x3 w0 A% ^( x- H# g - LibraryName=./libsqlmy.so: i" v$ ^- j0 h0 F
- Active=1
2 L+ W- a$ _# N% X+ e5 y - ---example---
# o, Z% [& j6 ~ q - % a5 L j- W7 s; i4 p0 l- A
- On a windows box, also running the MySQL server locally, it would be:
) V" H- u8 C: f' u - ---example---5 h% X, ]! n. j9 o) |
- [DBEXPRESS]# v. A) z% D& }
- sqldir=mysql_sql
* b; S0 i7 ^7 t1 [, x - Drivername=mysql0 x, i. c; u; E U! V0 z
- Database=test
& ?& y. `8 S. n: ]3 ^ - Hostname=127.0.0.1" N0 |4 R' f# G8 `; P
- User_name=testuser: |7 G6 \$ d- h0 ^" w/ `7 l
- Password=my_password8 ~9 w0 }0 B0 I' Y2 r
- GetDriverFunc=getSQLDriverMYSQL2 p1 @- e# g+ B; i
- VendorLib=libmysql.dll3 w* ^- ^0 p% Q4 z7 Y& F' p
- LibraryName=dbexpmysql.dll
. D U J& i) ~4 \+ V Z' s - Active=12 p" X' y5 u1 {, n0 }0 e9 m
- ---example----
. A+ N4 \" O) Q* { - - written 02.03.04 by pwk.linuxfan
' Z0 [5 p8 q0 D - w0 _( Y0 f9 a; i. k
复制代码 |
|