PDA

View Full Version : mysql4 and Invalid Username/Password again :-(


E-Razor
26-07-2004, 13:10
Hi guys!

I got the same problem some users have with mysql4 and teamspeak.
I read some topics concerning libmysqlclient_r.so.10.0.0.
First of all, i created a new database and added a user "teamspeak" with "all" permissions, i also checked if user+pass is ok:

mysql -u teamspeak -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1481 to server version: 4.0.20

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW DATABASES;
+-----------+
| Database |
+-----------+
| teamspeak |
+-----------+
1 row in set (0.00 sec)

mysql> USE teamspeak;
Database changed
mysql> SHOW TABLES;
Empty set (0.00 sec)

mysql>


Now I'm getting this error when starting the server:

26-07-04 12:52:21,ERROR,All,SQL, Database initialization error: EDatabaseError.dbExpress Error: Invalid Username/Password
26-07-04 12:52:21,ERROR,All,SERVER, Start_Server: unable to open database

My server.ini (dbexpress part only)

[DBEXPRESS]
sqldir=/opt/teamspeak2-server/mysql_sql/
Drivername=mysql
Database=teamspeak
Hostname=localhost
User_name=teamspeak
Password=mypass
GetDriverFunc=getSQLDriverMYSQL
VendorLib=libmysqlclient_r.so.10.0.0
LibraryName=/opt/teamspeak2-server/libsqlmy.so
Active=1


(i checked libmysqlclient)

ldd libmysqlclient_r.so.10.0.0
libpthread.so.0 => /lib/libpthread.so.0 (0x4f487000)
libz.so.1 => /lib/libz.so.1 (0x4f4d8000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4f4e9000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4f516000)
libm.so.6 => /lib/libm.so.6 (0x4f52a000)
libc.so.6 => /lib/libc.so.6 (0x4f54d000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x0e268000)


ldd server_linux
libpthread.so.0 => /lib/libpthread.so.0 (0x4e572000)
libdl.so.2 => /lib/libdl.so.2 (0x4e5c3000)
libc.so.6 => /lib/libc.so.6 (0x4e5c6000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4e556000)


I've no idea whats wrong -maybe it's cos i'm using an empty database or something, but i suppose teamspeak will add the right tables itselves.

Thanx for your help!

Brain
26-07-2004, 13:40
Shot in the dark: Did you confirm that the password is correct? Also, if you edit the config file on your Windows PC and then upload it to your Linux Server make sure to transfer it in ASCII mode. Since Windows uses CR+LF to denote a new line and Linux only uses LF you could get into trouble with the password which gets a CR appended :)

(oder auf deutsch: Nachdem Linux nur LF benutzt interpretieren manche Programme das CR als Zeichen, d.h. in der Paßwortzeile würde der TS-Server denken das Passwort sei "mypass<CR>" anstatt "mypass". MySQL kennt aber nur "mypass" => deswegen die Fehlermeldung "Invalid Username/Password")

E-Razor
26-07-2004, 14:13
>Shot in the dark: Did you confirm that the password is correct?
Yaeh, cos of mysql -p (prompt for password) worked, i took the password directly from server.ini via clipboard.

>Also, if you edit the config file on your Windows PC and then upload it to your
>Linux Server make sure to transfer it in ASCII mode.
I didn't -i used nano and pasted it directly to the console.


>(oder auf deutsch: ...)
looks like i should improve my english a bit :-P