View Full Version : mysql error number: 0
martync
Tue 22nd Nov '05, 6:57am
I have just set myself a test box up, copied over mysql db from my live site, changed the config.php servername to point to my IP address but I get the following error
Database error in vBulletin :
Link-ID == false, connect failed
mysql error:
mysql error number: 0
Where did I go wrong?
Many thanks
Martyn
eva2000
Tue 22nd Nov '05, 9:33am
is this local pc at home ? did you leave mysql server as localhost ? make sure mysql is running
martync
Tue 22nd Nov '05, 4:35pm
The server is at work sitting behind a firewall with port 3306 open, config.php is set to localhost and mysql is running because I can connect using mysqlfront
Anything else I can look at?
Thanks
Martyn
eva2000
Wed 23rd Nov '05, 8:26am
you might need to give or add user account and password for it to connect
http://dev.mysql.com/doc/refman/5.0/en/user-account-management.html
http://dev.mysql.com/doc/refman/5.0/en/adding-users.html
martync
Wed 23rd Nov '05, 1:10pm
I think the password bit is ok as I can connect using mysqlfront and display the DB
eva2000
Thu 24th Nov '05, 7:13am
did you give mysql username from web server ip privileges to connect to db server ?
martync
Thu 24th Nov '05, 9:22am
ok at this point I'm at a loss, how can I check it
Martyn
eva2000
Thu 24th Nov '05, 9:30am
read http://dev.mysql.com/doc/refman/5.0/en/connecting-disconnecting.html
try ssh telnet into web server and then type
mysqladmin -h databaseserveripaddress -u mysqlusername -p version
then enter mysqlusername's password at the prompt
where databaseserveripaddress = ip address of database server
you should be able to connect if database server's mysql has been told to allow access and connection from web server's ip address to mysql on db server
martync
Thu 24th Nov '05, 3:58pm
Thanks for the information but still no good from web page
mysqladmin Ver 8.41 Distrib 4.1.11, for redhat-linux-gnu on i386
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 4.1.11
Protocol version 10
Connection xxx.xxx.xxx.xxx via TCP/IP
TCP port 3306
Uptime: 2 days 9 hours 31 min 18 sec
Threads: 1 Questions: 586185 Slow queries: 0 Opens: 477 Flush tables: 1 Open tables: 60 Queries per second avg: 2.831
as you can see that works fine
Martyn
[edit] forgot to mention its SELinux.
eva2000
Fri 25th Nov '05, 5:24am
doh.. you tried setting in config.php instead of localhost the ip of the database server and not your own ip ?
martync
Fri 25th Nov '05, 2:29pm
Yes I have tried that but it did not work :(
eva2000
Mon 28th Nov '05, 8:21am
test box is that your own pc or a server with it's own ip address ? cause local internal pc's network ips aren't addressable online 192.xxx.xxx.x etc
martync
Mon 28th Nov '05, 1:11pm
Sorry I thought I had replied, must have been else where, anyway I have solved it now by using: -
setsebool -P httpd_can_network_connect true
Regards
Chet
eva2000
Wed 30th Nov '05, 8:42am
k glad ya got it fixed :)
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.