|
|
麻烦翻译一下,下面这段文章:xhan
# x$ J$ K4 w. l: i- l& F; {
/ [# O( T5 F# T- 2 I/ n! F8 W7 _ P3 N- C0 E' f6 {
- ###### Using MySQL as Database for TeamSpeak-Server 2.0.20.1 ######+ p) B, V' V' R$ J8 D( U$ o( m
- 7 e" O( A" `! n' C( y) [
- ### What we need ###
# v+ e+ [2 K9 ], I4 v5 D4 D - Naturally, we will need a MySQL server to store the data for us, this document
! p$ M! v H2 b' | W! | - will not explain how this can be done - there are documents out there for the + Z7 d1 M8 S% p# ~; U
- interested. The requirements include a (empty) database for TeamSpeak to use4 J) s: I$ A$ e! N q
- and a user account (username + password) that has the permissions to do stuff. ^+ G# z4 ^6 X8 t( l
- with the database. Additionally, you will need a vendor library installed on the
( p$ b4 G0 U# S% G2 [9 Y - local machine, this came with my MySQL install.
1 \. c D1 S/ B' A) k* f# K - These instructions will not tell you how you might transfer your data from the
0 N, s4 f' x9 d; w+ X - SQLite database to the MySQL database, we start with a clean and empty MySQL' {7 i9 Z# z1 M
- database.& s* m' R) D5 K/ I. ^
- Some users have reported ways to import a SQLite database into MySQL, but at
+ P9 \% `5 C7 Y3 A& K - the time of writing, there are still too many issues - check the current status4 f- m+ y+ V4 f2 }6 P% i8 Q
- in the TeamSpeak forums if you are interested.
]# ^6 h; ~! m5 D' M! R% T - NOTE: To allow TeamSpeak to access the MySQL database the dbExpress driver from
% w1 N1 G& _ D5 L6 L - Borland was used. This driver can only interface with the client library that 9 \1 V" A; u5 U( c5 c: D
- comes with MySQL 3.x. It is possible to access a MySQL 4.x database with this
+ o6 y+ A1 n& d G" j# ], Y. ? - client library - basically all you have to do is to use a 3.x client library as
) c5 R. J6 | C* z) H4 r% |+ C - "VendorLib" and a 4.x database to connect to., {9 c, [" l* M0 `4 t0 i
- If you need more info about dbExpress, you can contact Borland.
: N5 M* \* b, Y4 }, `) O - 2 n8 G7 v8 p+ F' G0 l) L
- ### Doing the work ###' V6 X) i3 ]4 N5 c
- Setting up TeamSpeak to use MySQL (should) be straight forward once you have all
0 j' w' [, Q* ?; S% M8 H - the perquisites right, just open your server.ini file, and add this section at1 M/ O7 _( Y6 l" {% ^& e: g
- the end:! Z# H$ q5 ]# a( N8 \' m
- ---cut here---# p9 E( g/ O2 t, o+ x; Y& e1 i
- [DBEXPRESS]- z2 w! K2 J# Z3 F
- sqldir=mysql_sql
3 r/ r T+ A. A9 V% M' ^7 X - Drivername=mysql, h" d6 ?& r$ ^0 u, o* ` q
- Database=Your_Database_Name_Here4 N9 V7 X- O6 _
- Hostname=The_PC_the_MySQL-Server_is_on
- W0 b% G3 \+ w - User_name=User_name_on_the_MySQL-Server
% H# \3 P0 J _5 l+ v! [ - Password=Password_to_go_with_above_user_name! m& j H6 |+ {/ U. ^) y" L5 ]% ^; e
- GetDriverFunc=getSQLDriverMYSQL
, w5 A5 Z6 S' K, g0 T - VendorLib=path_pointing_at_your_mysql_vendor_lib
, Y7 U4 e/ m3 ] - LibraryName=path_to_libsqlmy_libary8 b3 h& K' J$ r( j+ |9 k. D/ B
- Active=1, d& G4 ?: ~( N2 q; C" T
- ---cut here---
3 ~0 U3 Z# T4 D4 p- J3 L - In my environment (a linux box with a MySQL server running locally) I have:* e& U9 D, H" Y0 e& j& |; n
- ---example---
1 b5 d* G, ]. C/ z. k8 }$ J8 N! n - [DBEXPRESS]- _" q$ R( u8 i% Z4 ]+ `+ q
- sqldir=mysql_sql
+ }+ k, D% |1 R8 z: r; l7 D - Drivername=mysql
L8 h5 i4 d I* O& `8 V4 ~ - Database=test5 G0 x6 k1 `) @! Q- ~- A `
- Hostname=localhost3 i" e1 z" R7 d# G; ?7 g \ |
- User_name=testuser
3 H9 \" a* b4 R7 Q) z% i& S7 A$ K" V6 D - Password=my_password
. _) x& M( {# L - GetDriverFunc=getSQLDriverMYSQL
$ C" u& h- l* X" q" ]% p' e) ^ - VendorLib=/usr/lib/libmysqlclient_r.so.10.0.0
2 F& M" e6 w4 P; M1 f - LibraryName=./libsqlmy.so, R$ c6 W( ]; K9 _
- Active=1% ~6 l4 L. n/ ?# A& t6 [7 |
- ---example---: i$ Z+ A# r! W
- $ c( g# @4 r% e. B, g& p
- On a windows box, also running the MySQL server locally, it would be:
, N1 p& p/ t" Y- C - ---example---6 i& L. q( m3 m4 M! s6 P* t# e
- [DBEXPRESS]
" h% z" M( i f: A/ f5 B# F6 d1 N! Y - sqldir=mysql_sql' l" d2 a1 ]& u% I/ L5 B
- Drivername=mysql, R) L; H' J! q6 b7 s5 H8 x
- Database=test9 t* a: d$ o) b! S/ ~, v* ]
- Hostname=127.0.0.1
4 E# z, ~5 m* z+ ? - User_name=testuser
M) _1 {( |0 T% `/ g" [ m - Password=my_password% u2 L& A. s y, f
- GetDriverFunc=getSQLDriverMYSQL0 H8 A# g! K e
- VendorLib=libmysql.dll6 T `4 a9 D4 `2 n" O/ z5 t
- LibraryName=dbexpmysql.dll+ I) A9 W) S+ K: \ }' e
- Active=1
( e! x7 w0 h( G; U; `0 a) m6 A - ---example---- c! ^! {% W. E# O1 ^; o; d p4 k
- - written 02.03.04 by pwk.linuxfan" }5 D/ ^) D) f4 w& _8 {! `9 n" d u
- # K+ @& y2 A8 M! t
复制代码 |
|