|
|
麻烦翻译一下,下面这段文章:xhan ( n- ~; `6 W. `9 Q3 N! w& |9 R
/ e+ h9 k3 b c! p-
8 r4 q7 x8 o" _8 p. k# @ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
9 T4 e$ U5 F; t1 y4 h* l" c
' |. e7 T5 M5 ~- v* x7 o- ### What we need ###
6 y& Z$ C j; ]7 W+ o* i# J" b - Naturally, we will need a MySQL server to store the data for us, this document . C2 k0 P2 N! E' F0 r! Q
- will not explain how this can be done - there are documents out there for the
! K! I/ \0 }2 R - interested. The requirements include a (empty) database for TeamSpeak to use( A1 ?1 ?% c0 v9 O! H5 l
- and a user account (username + password) that has the permissions to do stuff" q: C2 T) c. ~' b5 [# _. Y1 w
- with the database. Additionally, you will need a vendor library installed on the
& b" I! p/ v8 \ v9 V- j - local machine, this came with my MySQL install.
. u7 F7 q0 s: ~# R0 r( z - These instructions will not tell you how you might transfer your data from the& ]: x: b8 a* r2 F
- SQLite database to the MySQL database, we start with a clean and empty MySQL
@ [! b. D" l7 u- F; O: x% [4 c - database., g" K5 m4 {. R+ a- E6 ~# M
- Some users have reported ways to import a SQLite database into MySQL, but at7 c5 W' c9 P) p
- the time of writing, there are still too many issues - check the current status
2 o7 i: |& N. L4 u4 H0 C - in the TeamSpeak forums if you are interested.1 X3 E( I5 o8 i
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from c7 ~) l; ?- B' r4 Q, b1 n
- Borland was used. This driver can only interface with the client library that 0 {, @# K7 [9 B& z3 F
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this6 _8 s0 i; M* J& j
- client library - basically all you have to do is to use a 3.x client library as 8 w: @/ s; b' Q: w$ b9 X
- "VendorLib" and a 4.x database to connect to.- _# S" r4 Q5 M/ V- c
- If you need more info about dbExpress, you can contact Borland.
% {5 M7 G: g3 x7 x - % X9 U. M6 s6 o0 M$ K
- ### Doing the work ###! i( o& c1 J5 K+ b
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all* E5 L1 C# D' ]* ?
- the perquisites right, just open your server.ini file, and add this section at
2 i1 e4 {; Z6 A/ L, C+ | - the end:3 C {% G% O8 t! |8 L6 x- [
- ---cut here---/ L& U% Z( A, J& S
- [DBEXPRESS]
u. n$ w8 |2 J4 g/ Z6 A7 f - sqldir=mysql_sql* S# j3 b: P5 r8 I+ k
- Drivername=mysql
5 u# e! G' r& A4 z g - Database=Your_Database_Name_Here
. ?6 s# A4 A. @! H, c! b" v/ ^ - Hostname=The_PC_the_MySQL-Server_is_on
6 F3 C8 E2 j& x. f+ n2 u - User_name=User_name_on_the_MySQL-Server
9 C) j9 p4 A/ a! p. l N - Password=Password_to_go_with_above_user_name# I: h& q4 H% H# x
- GetDriverFunc=getSQLDriverMYSQL- y. v5 X& p4 z; W4 D
- VendorLib=path_pointing_at_your_mysql_vendor_lib3 [! i& W: J0 L/ `1 i
- LibraryName=path_to_libsqlmy_libary
, w8 ^7 Y& J8 j# W - Active=12 }+ X' M3 c) M* I9 E* g* n
- ---cut here---/ G& l) B$ h' W) j
- In my environment (a linux box with a MySQL server running locally) I have:
4 `$ C/ U1 p1 r' u A* U1 q - ---example---
- H+ X* m( M! O1 d; z+ q, t - [DBEXPRESS]
% g1 x1 z- T( D! Z& }8 k - sqldir=mysql_sql
# ^2 I' |' g9 U4 d8 o, Z3 b6 ^ - Drivername=mysql: S' b5 m' j$ E% W& t$ v" g
- Database=test( Y/ f" w% s* K# M1 e! b; t5 i! g+ o
- Hostname=localhost4 S$ [/ e4 Y0 J- s
- User_name=testuser
) ?! e* L) | V Z7 ` - Password=my_password% c# s u0 d/ O# d. y+ p1 {2 G
- GetDriverFunc=getSQLDriverMYSQL
0 Y+ P8 h& E8 K - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0. a1 f0 p. X+ z/ v3 m
- LibraryName=./libsqlmy.so$ w2 E* H: B+ W. ]* [" _
- Active=1
' J+ T. r! H6 P5 `5 V$ h. [/ J - ---example---
1 R( S9 Q" F8 E: V/ ?& |! W
: g4 Q% e% \9 B+ k0 r& ~- On a windows box, also running the MySQL server locally, it would be:# E L9 c8 |) v, |' R% I
- ---example---) y4 {/ ^% {9 H6 S; Z) Y3 |
- [DBEXPRESS]
( D) z C8 t! b. J - sqldir=mysql_sql
8 ]7 m7 z9 U8 {' w8 ` - Drivername=mysql( X8 Y- o* k5 F) S9 n) S
- Database=test
& z$ q% k C6 d - Hostname=127.0.0.1' @( V2 |8 k( a
- User_name=testuser
3 m8 ^: p1 m- z3 i" `. | - Password=my_password
8 \3 o5 X" {: E! f5 W - GetDriverFunc=getSQLDriverMYSQL
+ M4 q% J- q; q X" w# f2 _ - VendorLib=libmysql.dll
w+ F- ]2 {* F! |1 } p' N% { - LibraryName=dbexpmysql.dll' x& V1 u& Z1 _# |
- Active=1) G: \* Y2 { \
- ---example----! I: Y9 D) D1 F) f) K
- - written 02.03.04 by pwk.linuxfan
: k6 \2 X% `4 e" y# ?" T, b4 r - 7 D/ \2 r, _) u1 @8 P7 K
复制代码 |
|