|
|
麻烦翻译一下,下面这段文章:xhan ' z/ L5 a3 g* Y
' _+ @6 ~( `$ b5 a) g/ Z$ O
-
0 c0 C4 D6 N* j# t; k8 q/ `/ m - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######, @, K7 _9 O" r8 ?* E
- 6 S3 ]% T8 V2 W8 l
- ### What we need ###9 r' K: d) p! S" m' o0 }- C
- Naturally, we will need a MySQL server to store the data for us, this document 9 {5 k4 h' D* A2 L2 K/ M) _
- will not explain how this can be done - there are documents out there for the : N3 @% B; ]) z
- interested. The requirements include a (empty) database for TeamSpeak to use
$ K2 L( _$ H2 Y" T$ f9 f1 h - and a user account (username + password) that has the permissions to do stuff
! \- F/ }! K1 ^6 U - with the database. Additionally, you will need a vendor library installed on the
! k9 J% ]1 g) M k- Z - local machine, this came with my MySQL install.
: C1 C- N. ^: n1 p) v2 Z - These instructions will not tell you how you might transfer your data from the% H- d( s) B. U4 h E5 J
- SQLite database to the MySQL database, we start with a clean and empty MySQL: S9 h4 ^5 J$ M1 L5 t' m
- database.% {, ?5 u9 A6 k3 X, B8 |
- Some users have reported ways to import a SQLite database into MySQL, but at
s" k% m* C& p( I$ f& B - the time of writing, there are still too many issues - check the current status' U' Q6 c1 Z! k
- in the TeamSpeak forums if you are interested.( T* G8 k! N7 n; {
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 F Y' b# {( X. A
- Borland was used. This driver can only interface with the client library that 9 v1 P9 T x7 ~- h
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
; S- o& \: Z) b' r - client library - basically all you have to do is to use a 3.x client library as
0 c2 D) t7 Z$ v c6 R! F% m8 P- r - "VendorLib" and a 4.x database to connect to.
# R) V* ^1 s; {! c5 u5 `% q - If you need more info about dbExpress, you can contact Borland.
& e6 {$ n- J$ o
$ }/ `3 B1 W {0 j/ N$ l- ### Doing the work ###& M0 T4 S( b$ s$ T) {3 a- E4 n# B: \
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- w) x% _& _8 a5 v/ \; [
- the perquisites right, just open your server.ini file, and add this section at
4 \4 @$ S8 L7 H) _& c# | - the end:! I0 C; M* `; z. k
- ---cut here---; P0 V& }2 F3 e! z2 U& ?: |8 D
- [DBEXPRESS]
0 t! \! }# r6 `4 N* V) X& C - sqldir=mysql_sql$ v( o3 K5 W/ s3 y
- Drivername=mysql
0 C6 o' w4 F+ f1 @2 k, W1 M1 r - Database=Your_Database_Name_Here" r- o" m7 ~' S9 q/ G
- Hostname=The_PC_the_MySQL-Server_is_on( n$ y x. M- N0 I5 H6 [
- User_name=User_name_on_the_MySQL-Server
h2 A5 @- E+ s5 j L - Password=Password_to_go_with_above_user_name
& ^4 H9 D' J$ k$ n0 R: M - GetDriverFunc=getSQLDriverMYSQL/ I* }, T, ?' ]" D9 c. | I4 ~4 V4 P
- VendorLib=path_pointing_at_your_mysql_vendor_lib
) N% r% j, @+ P - LibraryName=path_to_libsqlmy_libary E2 P- S" k2 A" }
- Active=1
$ H5 X( E& y* c" Q2 l0 H - ---cut here---$ C6 V* B% C& [& B2 p
- In my environment (a linux box with a MySQL server running locally) I have:
' E/ w7 A6 m* h- m/ b+ ] m+ H; ~: V+ K1 D - ---example--- m: y5 D p2 M# e' O
- [DBEXPRESS]
# g: W% u9 K. h) H: F - sqldir=mysql_sql
- l0 D; M0 {# p- Z - Drivername=mysql
% R4 Y W$ h$ r - Database=test& Y7 g. z/ a6 w8 Y# W% Z5 `
- Hostname=localhost
3 g) w( H9 v+ ~7 B3 G: [7 E - User_name=testuser
S& k5 K; \* O6 i; T* R/ z - Password=my_password& F, _# b4 v9 H
- GetDriverFunc=getSQLDriverMYSQL) A" |" b1 s; i) W3 e& M/ D
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
- ]0 Z0 @# ?' z! `8 E% e) c - LibraryName=./libsqlmy.so& v7 N# G: F. {0 m8 T
- Active=1
+ @& ^! X' {- g3 Z6 F, Q7 r( ]+ l - ---example---' `' R5 m2 C/ D4 v; m
: `9 V( M) f7 a- A. B e$ y- On a windows box, also running the MySQL server locally, it would be:& [; J' ?4 v. ?1 o, Z; Y, e
- ---example---
+ s9 ?( v$ L7 v - [DBEXPRESS]
+ q4 V) Q" p$ m$ f# q - sqldir=mysql_sql9 c2 T8 \, A3 k& k e s
- Drivername=mysql
. O6 k# u$ j7 `- c' g - Database=test
1 T. [6 x. N+ `1 l& t W) q - Hostname=127.0.0.1
, N6 e& U" I- }, I3 E - User_name=testuser. n% {. i( ?5 U7 n4 E
- Password=my_password: T4 \4 \+ u$ @
- GetDriverFunc=getSQLDriverMYSQL, I5 f: h8 f* P6 _. w8 Y& p
- VendorLib=libmysql.dll7 d/ S- T \8 M' V$ T! ~, \
- LibraryName=dbexpmysql.dll) ?9 g( K5 w. u9 a: H: [! R
- Active=1
8 P7 m0 h% y. i( q& B - ---example----5 O2 n+ U! j. C2 \% Y0 c S8 i, w
- - written 02.03.04 by pwk.linuxfan
& p5 E' ^5 E4 L. v1 ^
) B! |& F- Y% U L/ d9 I
复制代码 |
|