|
|
麻烦翻译一下,下面这段文章:xhan F+ {9 p( O7 l% H7 |; y- e" w
0 m% ]4 }, b% n( I# t- " F# G& j8 k0 u: O
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######. H" K, C# K1 ?. ?' m' M( ~
- / D) S# N- h6 C( E
- ### What we need ###
9 U# t4 }; R: Z - Naturally, we will need a MySQL server to store the data for us, this document % E* t; N: Y' {6 H& f& v6 P$ O
- will not explain how this can be done - there are documents out there for the ) b1 w* m9 Y$ K6 E3 Z' M
- interested. The requirements include a (empty) database for TeamSpeak to use- {% f! G3 O& Q) u# ]4 d
- and a user account (username + password) that has the permissions to do stuff
' _" P- q, Q; j6 Q' P/ F7 T - with the database. Additionally, you will need a vendor library installed on the
0 n/ Z' D" Z7 `# {1 a7 h, b+ l - local machine, this came with my MySQL install.
/ E/ \2 i& o2 z% E+ x1 t* _% T$ C - These instructions will not tell you how you might transfer your data from the) O. A8 n& @2 J: A& g" g2 E" y
- SQLite database to the MySQL database, we start with a clean and empty MySQL
( s. b; y6 E. w: q% I+ L - database.7 k3 W4 N8 j* H6 w) R' q" j
- Some users have reported ways to import a SQLite database into MySQL, but at
* W: j! z3 {2 B1 r6 q - the time of writing, there are still too many issues - check the current status
% L( x( {2 V) R - in the TeamSpeak forums if you are interested.
: J3 ?7 y$ d/ M) Q6 ~$ O - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from6 @" Q/ z# Q/ [9 R+ V! Y
- Borland was used. This driver can only interface with the client library that & g, f8 @" K# U# z. e
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
6 w2 u. z) L# `5 Z - client library - basically all you have to do is to use a 3.x client library as 5 N% R+ o6 }5 D" x' z- q4 z
- "VendorLib" and a 4.x database to connect to.( Y" u* M0 i" c w. z, d
- If you need more info about dbExpress, you can contact Borland.
# ^5 j2 R+ M _# O
0 T0 ~" \& L6 r9 K) b- ### Doing the work ### E! j: @2 Q% j& O
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
2 D( z, Z: Z0 x$ j - the perquisites right, just open your server.ini file, and add this section at
' l f9 G# w5 l8 q6 B4 X! \( F$ y - the end:
* L, Q/ L4 ]7 e' l: w ] - ---cut here---6 Q: h4 X1 G4 I& J, h" W
- [DBEXPRESS]8 X4 U6 \7 H/ H
- sqldir=mysql_sql8 f6 H: i7 x+ z1 }" j5 ^2 W
- Drivername=mysql
* d& u5 |1 B% |' t# I; D, q - Database=Your_Database_Name_Here
3 @8 U2 y( r8 E8 d* ^& M6 m - Hostname=The_PC_the_MySQL-Server_is_on
2 w2 n4 F+ |- ` - User_name=User_name_on_the_MySQL-Server7 n3 P! [) P# S) I! N1 R! X
- Password=Password_to_go_with_above_user_name
! p8 I$ @* Y, o+ H7 Y1 [ - GetDriverFunc=getSQLDriverMYSQL8 T7 j9 W# f5 |& y N
- VendorLib=path_pointing_at_your_mysql_vendor_lib7 N' Z- ?' G# ]1 I. R! `
- LibraryName=path_to_libsqlmy_libary0 K* Z9 x% g( U% r
- Active=1
( x6 k4 ^/ b3 }# T' S - ---cut here---# a9 Q* l9 |5 i0 u
- In my environment (a linux box with a MySQL server running locally) I have:
; n. l7 P8 n. l - ---example---7 e$ I' M6 i' L; N6 ~/ w
- [DBEXPRESS]
7 G _2 v6 ?3 H7 I( E; W - sqldir=mysql_sql# g$ G, h+ ] N
- Drivername=mysql; @8 F1 R3 f, ^) V% y% _
- Database=test
* m m; o1 x% H E - Hostname=localhost& r/ I% N4 N! e# i: D5 C, ]3 p# D
- User_name=testuser% p4 w+ z" i( a$ i5 }/ b& z
- Password=my_password5 e: s: d# \' A- r. c& z
- GetDriverFunc=getSQLDriverMYSQL1 \! p, k6 s0 R+ g g. j! n
- VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
! s9 u6 |( c/ y$ `; K4 J - LibraryName=./libsqlmy.so
- p4 y8 Z; S: R3 c - Active=1. q3 w. w& ]2 G k
- ---example---
. f- Y ]! b* K5 C - 0 j$ D$ i* g3 c7 M9 {8 ^; _, _
- On a windows box, also running the MySQL server locally, it would be:
" c/ A* z1 l5 X9 d - ---example---$ B# @+ j6 c9 t6 S4 q' A5 {
- [DBEXPRESS]
( a0 w1 j7 @% ^) c/ _5 u - sqldir=mysql_sql
( m* f# {0 h( y- | - Drivername=mysql8 ?: [( L3 t* Q6 w' `1 C, k
- Database=test$ R$ V' @) {' ~- F3 ^8 r
- Hostname=127.0.0.1
! J3 p7 @. L9 L7 A! B& x1 r: } - User_name=testuser }- ^) m) y: s2 S' B( K
- Password=my_password
& [6 Y: k( g: {3 C8 e - GetDriverFunc=getSQLDriverMYSQL. b1 k6 ^8 R6 R: e) ]5 y
- VendorLib=libmysql.dll1 ?' \0 U$ e5 Q
- LibraryName=dbexpmysql.dll
! M- I$ m6 O# n; k! v J( h - Active=1
! T0 E1 @" e1 R- o5 Y - ---example----
9 b7 t/ w& X& M - - written 02.03.04 by pwk.linuxfan q) u# @% d4 u) N2 ~# z
! \" Z* O7 m% r
复制代码 |
|