|
|
麻烦翻译一下,下面这段文章:xhan . l7 r5 t& G% T: P0 @' C- R
$ f" ^. ~8 C: ^( i; ^- J, _+ @, F
-
+ T0 {4 O4 L% [ - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######
! f6 X5 |% g! X- N" K( ~" A - ( k5 [( w8 N2 d) y$ f3 ^$ ^: u/ t
- ### What we need ###
7 T' ]7 d% ?( l: h# r: L - Naturally, we will need a MySQL server to store the data for us, this document
) @5 [) |* j7 H$ f# ~ - will not explain how this can be done - there are documents out there for the 0 `* Q+ }1 H) S# A5 N" b6 |
- interested. The requirements include a (empty) database for TeamSpeak to use
7 Y7 I0 g0 k& c9 _1 N - and a user account (username + password) that has the permissions to do stuff* K) Q6 o4 L8 p. |
- with the database. Additionally, you will need a vendor library installed on the
0 m! R3 h6 D+ D7 h - local machine, this came with my MySQL install. S3 ~4 i7 v% v4 o6 c, \
- These instructions will not tell you how you might transfer your data from the
- g0 r4 o8 a) a - SQLite database to the MySQL database, we start with a clean and empty MySQL) C7 X; D% Q: L3 q
- database.
: }2 Y. W8 f. M( [# E4 B - Some users have reported ways to import a SQLite database into MySQL, but at+ f9 p2 t: }# ]" `
- the time of writing, there are still too many issues - check the current status+ Y" v, |* f7 D; }# h& B) g
- in the TeamSpeak forums if you are interested.% m. t; ^) o- L3 ?
- NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
4 j+ Z' O; W) Z8 X0 u* v& s - Borland was used. This driver can only interface with the client library that
* {* c3 B2 c1 H/ j, \ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this: {% `5 E7 x# M; i% b$ R z0 L
- client library - basically all you have to do is to use a 3.x client library as % B- W+ N0 a8 y; E: s0 Y
- "VendorLib" and a 4.x database to connect to.
8 x# w( }: W5 a) G' k, |5 m3 `9 w - If you need more info about dbExpress, you can contact Borland.2 e% w6 f3 o: \2 |
# _0 j6 o1 a$ \) J2 [6 \+ p- ### Doing the work ###9 [" g: c! M9 q
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all( x) ^- ^$ _2 \
- the perquisites right, just open your server.ini file, and add this section at: l$ w- W+ [, b- d9 @
- the end:. C5 r0 K% o& o! u. m7 g3 m
- ---cut here---, g2 s" K F6 a4 U1 P/ L& J
- [DBEXPRESS]
# R" j7 B3 c3 q4 ]/ @8 | - sqldir=mysql_sql8 ^# t% q4 {1 w0 ^( V# M
- Drivername=mysql
7 Z9 L9 C) B0 @. @- I# V0 W - Database=Your_Database_Name_Here# L @5 R0 T( L
- Hostname=The_PC_the_MySQL-Server_is_on
% A3 Y# x$ u' z- K5 j2 n0 D - User_name=User_name_on_the_MySQL-Server
" P) s" M" y+ q( b2 Q' q3 Z. A - Password=Password_to_go_with_above_user_name
% b/ Y9 h/ A# v- N9 Y0 [: F* W3 l7 x - GetDriverFunc=getSQLDriverMYSQL
- V" m9 Z3 A/ U# p3 U& e. s( k% R - VendorLib=path_pointing_at_your_mysql_vendor_lib2 z( K3 H7 ]! i0 y! n6 p3 n
- LibraryName=path_to_libsqlmy_libary
! U, R' U. Y" u, d+ q - Active=1, \, @/ ~% E. |
- ---cut here---/ }" f8 D/ u* ~: D% @
- In my environment (a linux box with a MySQL server running locally) I have:
! g9 |. n( r+ S V - ---example---9 Y% [, r4 p3 X* ~- w
- [DBEXPRESS]; E2 |+ p% C7 c* F0 d9 d8 A6 L
- sqldir=mysql_sql
) T* \- C! f" l" T6 [ - Drivername=mysql; b7 A6 m" R" F6 J* o$ K
- Database=test- @, W2 D. p! ^: U
- Hostname=localhost( y5 |0 g; m& V( \/ @
- User_name=testuser
+ w/ x3 h5 T+ {: J7 B5 y2 Y- { - Password=my_password* I9 F. M8 {, m5 s6 F( Z& Y
- GetDriverFunc=getSQLDriverMYSQL
% x- G( v6 i0 n - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.01 `4 D( A3 Z7 ^" p+ x
- LibraryName=./libsqlmy.so) V* ~% t! I; i% I9 a) i" B4 u5 L( N
- Active=1! r2 d3 i" ~# N& J# p
- ---example---; e) O2 w* w( N' j8 n& c$ e
- 4 x% `; g6 r' m8 H' X8 Q
- On a windows box, also running the MySQL server locally, it would be:8 J4 N6 }( q( H/ ?/ k
- ---example---
0 b2 k( T/ W+ N% c Q - [DBEXPRESS]
3 c6 y9 p/ w! I# [- X - sqldir=mysql_sql
0 w6 r1 v8 ?/ Q. d5 `* W3 y2 v - Drivername=mysql4 U1 _0 m/ t- O+ [4 C6 w
- Database=test
G: z/ n1 w2 H" g - Hostname=127.0.0.1
$ j2 x( F$ {& y6 p# j$ R - User_name=testuser) e8 Y# T4 f% D
- Password=my_password
* P, y" u, D! Q0 P - GetDriverFunc=getSQLDriverMYSQL
0 L3 q; A% Q. R: \% T - VendorLib=libmysql.dll& Q8 T4 l& T. Y! o7 G6 v
- LibraryName=dbexpmysql.dll
. j; b# `+ M: _, S1 g - Active=1
- [# j5 C1 o, R - ---example----
8 |4 N9 e# M; b+ W - - written 02.03.04 by pwk.linuxfan
8 e0 i, ^9 S" C! o1 m
* A3 E1 }! _+ d' U, z
复制代码 |
|