vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   connecting to mysql db from an outisde php script (https://vborg.vbsupport.ru/showthread.php?t=174301)

k007 03-27-2008 07:14 AM

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)
and i have also tried creating a totally new mysql user and gave it access to the vb db and tried to connect from there but i still get the same exact error.

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,

Dismounted 03-27-2008 09:17 AM

Connect from localhost with the username/password combination from your config file.

Opserty 03-27-2008 10:23 AM

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?

k007 03-27-2008 05:40 PM

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.

Dismounted 03-28-2008 02:39 AM

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.

k007 03-30-2008 07:52 AM

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.


All times are GMT. The time now is 08:15 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01069 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete