|
|
麻烦翻译一下,下面这段文章:xhan
0 ~6 |; Z4 N1 W8 l1 V6 [
- Y9 o5 H5 r9 d/ t9 ?, S-
# |0 ?) p1 I" M! V% S - ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######, x8 o+ U6 r2 C! i& z
A: F l6 n6 \- ### What we need ###
* S( g3 ]. W3 H4 {7 v - Naturally, we will need a MySQL server to store the data for us, this document ; Q8 ^3 k8 R! Q
- will not explain how this can be done - there are documents out there for the " [: Z3 k* W2 Y. F
- interested. The requirements include a (empty) database for TeamSpeak to use
$ F' @* t- c, w# z& Z o - and a user account (username + password) that has the permissions to do stuff
$ p+ I* ^% N/ f9 ?# Y - with the database. Additionally, you will need a vendor library installed on the
; M( q' h* i4 G3 o - local machine, this came with my MySQL install.
. \6 J* g0 \+ }( A2 ` - These instructions will not tell you how you might transfer your data from the
1 w; Z" X2 l; g; _% R! \ - SQLite database to the MySQL database, we start with a clean and empty MySQL$ Q3 O9 s$ U$ R
- database.
# M7 a6 o: m/ K( E% w+ y - Some users have reported ways to import a SQLite database into MySQL, but at6 U- ~& K- U! ^) E# A
- the time of writing, there are still too many issues - check the current status
: u* \1 U c* H- y J - in the TeamSpeak forums if you are interested.
" [' {5 W6 H) p3 q, w8 T - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
* T4 ?/ {2 H0 ]0 a - Borland was used. This driver can only interface with the client library that
0 E9 a# e1 U. A1 m8 z4 m! k0 _ - comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this, @+ X* J5 _/ s1 m% b% f$ |4 n
- client library - basically all you have to do is to use a 3.x client library as
$ [" z& j' Q! \% d% b+ ~ - "VendorLib" and a 4.x database to connect to.
* p! p% n5 q: ~/ @& R- f - If you need more info about dbExpress, you can contact Borland.
7 b) @9 W/ }2 e* z/ q
7 o" f9 [9 N P% y) }% d) P- ### Doing the work ###
+ P! q+ q' Y* S6 G7 a/ R; F( u2 S9 r - Setting up TeamSpeak to use MySQL (should) be straight forward once you have all- B) |# l4 h3 d& ~- {
- the perquisites right, just open your server.ini file, and add this section at
7 _! | G9 r( J( d+ N# j: Y* O2 J - the end:' R. i. |. l9 w
- ---cut here---* U4 n; A7 ^; B! O: x& @
- [DBEXPRESS]7 O" n: Y/ A' H
- sqldir=mysql_sql
; N3 C$ C8 v6 L - Drivername=mysql
6 G/ w* Q8 C5 S. x$ l5 T X" m - Database=Your_Database_Name_Here
7 ~: K0 v* f6 g8 y7 e - Hostname=The_PC_the_MySQL-Server_is_on6 ], m( a2 x/ v9 n" L/ ]8 s2 {2 m7 A
- User_name=User_name_on_the_MySQL-Server* | O9 S' a1 @' l# h( o
- Password=Password_to_go_with_above_user_name
1 g/ Y1 M' ], f - GetDriverFunc=getSQLDriverMYSQL
2 j$ A- {8 n9 m/ s( B. A; V y; Y - VendorLib=path_pointing_at_your_mysql_vendor_lib* ^8 z7 `; `, J4 r% [2 w
- LibraryName=path_to_libsqlmy_libary
8 o9 E! v0 D! z$ {7 | {0 ]$ B: y- f - Active=1
$ O A- k$ R% o } - ---cut here---
5 U) D' ~$ m# [6 d: R+ I0 B! J) `) h - In my environment (a linux box with a MySQL server running locally) I have:
- g0 G7 m. ^1 {0 h0 `. n" C' k - ---example---# A4 z% l' f4 y; D, T0 T
- [DBEXPRESS]
1 N$ `& r+ |& M, G. ] - sqldir=mysql_sql
1 v: U- P \& j" a# p& \' L - Drivername=mysql
7 b$ c! W$ }, Y" a - Database=test
6 N' N! ]1 d( f! \! d - Hostname=localhost$ S$ x2 u. I, d' H
- User_name=testuser" G& v* } S$ t, ]6 V: D; H
- Password=my_password
8 R) v" Y6 ? w0 i8 ~& f - GetDriverFunc=getSQLDriverMYSQL
% I- {& x2 B6 F - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0* \# v# o1 s% `- o6 J6 U1 d$ [& ?! F
- LibraryName=./libsqlmy.so2 u9 ?$ m" l) a" k) H. R5 p
- Active=1+ G. E. j& e# A
- ---example---+ Q0 q7 n ? S0 |
- 3 O" k1 {" n# f! \. a6 w
- On a windows box, also running the MySQL server locally, it would be:
; h% G5 P0 W3 _) k; r1 Y0 _ - ---example---, e# |+ l2 n, \8 B% I
- [DBEXPRESS]- c }2 X: s+ z2 E B/ ^
- sqldir=mysql_sql1 T+ T: X3 `! B7 {
- Drivername=mysql
E* _1 {! m; J( z! l7 a6 | - Database=test
7 v2 q6 _# j$ e9 {( ~1 J2 C/ c - Hostname=127.0.0.1( `, E4 ]- ~9 C2 z
- User_name=testuser
5 D5 N+ n* I% ] ? - Password=my_password
* n1 d& @& H$ N - GetDriverFunc=getSQLDriverMYSQL
2 _2 u. C) G- m. E: A$ Y' i) p0 v - VendorLib=libmysql.dll
$ n% |$ }9 g; y2 ] - LibraryName=dbexpmysql.dll
, w5 {! L$ N/ Y - Active=1! n" n: T% g# l& g ]3 K
- ---example----
6 |2 X+ @" s+ J9 }7 [ - - written 02.03.04 by pwk.linuxfan9 |8 {/ U; ? f+ q
! c+ |+ P5 P0 _" u$ O
复制代码 |
|