The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
connecting to mysql db from an outisde php script
hello,
i have been trying to connect to the vb db of my forums just to read _session but i cannot seem to connect, i have tried connecting from another host with the same username/pass from the vb config file, i get errors about this host has no access to connect to this db. i have also tried connecting from the local host but i kept getting the same error which is Code:
Access denied for user 'username'@'host' (using password: YES) yeah im sure im using the right info and the users got the right access. i have tried connecting to the db using the normal mysql_connect, pdo and using a custom framework tool(code igniter) but everyone gives me the same error. thanks, |
#2
|
||||
|
||||
Connect from localhost with the username/password combination from your config file.
|
#3
|
|||
|
|||
Are you trying to connect from one server to a MySQL database on another account/server?
Or are your scripts located on the same server/account as the MySQL database? |
#4
|
|||
|
|||
i tried both, connectin as a localhost and from an outside script but same problem. yeah i have pulled off the info from my config file.
|
#5
|
||||
|
||||
Then does your vBulletin work? If it doesn't, you have issues with the combination, if it does, you're doing something wrong in your script. Also, MySQL will (by default) limit connections to only the localhost, this is a security feature.
|
#6
|
|||
|
|||
yeah the forums works ofcourse lol, i have fixed issue by just changing the hostname from the ip/name.com to 'localhost', and for the external web server i just went to cpanel and added the web server ip as mysql host and worked too.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|