FORUM HOME | WHUK BLOG   
WEB HOSTING UK AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM
PHP LINUX SHARED HOSTING WINDOWS ASP.NET HOSTING PACKAGES
ECOMMERCE HOSTING ASP MSSQL MS ACCESS ODBC FRONTPAGE HOSTING
CPANEL WHM FANTASTICO RESELLER DEDICATED SERVER WEB HOSTING
CHEAP PLESK CPANEL HTML MYSQL BEST UK VPS HOSTING COMPANY
CHEAP RELIABLE UK HOSTING PROVIDER SINCE 2001
MANAGED WEB HOSTING SERVICE
AFFORDABLE WEBSITE HOSTING SERVICES IN UNITED KINGDOM

Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum » Technical Support » cPanel Shared Hosting

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 01-01-10, 04:54 PM
new member
 
Join Date: Dec 2009
Posts: 5
Default MySQL Connection String

Despite reading a couple of other similar posts & solutions, I'm still having problems connecting from my pc to the remote MySQL database.

The following is a repeesentation of my connection string (VBA - a similar one works fine for my local db on localhost):

strConn = "DRIVER={MySQL ODBC 5.1 Driver};" & _
"Server=whatgoeshereforaremoteDB?;" & _
"Option=16384;" & _
"Port=3306;" & _
"Stmt=;" & _
"Database=dbname;" & _
"Uid=username;" & _
"Pwd=password;Option=3"

I think I'm having problems with the Server section. I've tried:
  • webhosting.uk.com's IP address
  • my site's ipaddress (which may not be static...)
  • the web address of my site (minus the www dot)
  • the web address of my site

I frequently get the error 'Access denied for user 'username'@'(my IP address)' (using password:yes)'

The username & password are those that the php uses to connect to the MySQL database during normal web site use.

Can anyone shed any light?

Thanks for listening.
Cornerpilot
Reply With Quote

  #2 (permalink)  
Old 01-01-10, 06:42 PM
Windows System Admin
 
Join Date: May 2009
Posts: 15
Default

Hello,

You get error message "Access denied" only when your database user do not have sufficient permissions over the database. This can be easily fixed by granting necessary permissions to DB user.
If you let us know the database name and its login details along with domain name under which its created then we can grant the permissions for you.
Reply With Quote

  #3 (permalink)  
Old 02-01-10, 09:18 AM
new member
 
Join Date: Dec 2009
Posts: 5
Default

Thanks, but what value should I enter for 'Server'?

C
Reply With Quote

  #4 (permalink)  
Old 02-01-10, 09:32 AM
new member
 
Join Date: Dec 2009
Posts: 9
Default

Hello ,

The value for server should be localhost if your account is on plesk server and if your account is on a dotnet panel server then you should use the IP of the database server .

Regards,

Paul.
Windows Support Department.
Reply With Quote

  #5 (permalink)  
Old 02-01-10, 10:02 AM
new member
 
Join Date: Dec 2009
Posts: 5
Default

Thanks Paul.

My account is on CPanel on Shared Linux Hosting; what should I use for that?

When I use the IP address (115.124.117.240) & Port (2306) - shown in the IE/Firefox address bar of phpMyAdmin for the remote DB, I get the message:
Lost connection to MySQL server at 'reading initial communication packet', system error:2'

If I use port 3306 I get the message:
'Can't connect to MySQL server on '115.124.117.240' (10060)'


C
Reply With Quote

  #6 (permalink)  
Old 03-01-10, 12:14 AM
sysadmin's Avatar
Administrator
 
Join Date: Oct 2006
Posts: 295
Smile

Quote:
Originally Posted by cornerpilot View Post
Thanks Paul.

My account is on CPanel on Shared Linux Hosting; what should I use for that?

When I use the IP address (115.124.117.240) & Port (2306) - shown in the IE/Firefox address bar of phpMyAdmin for the remote DB, I get the message:
Lost connection to MySQL server at 'reading initial communication packet', system error:2'

If I use port 3306 I get the message:
'Can't connect to MySQL server on '115.124.117.240' (10060)'


C
You need to use localhost in your scripts to connect to the MySQL database. Also, please open up a support ticket if you're still facing problems with connecting the SQL server through your scripts.

I'm moving this thread to the appropriate (cPanel Shared Hosting) section for further assistance.
Reply With Quote

  #7 (permalink)  
Old 03-01-10, 10:27 AM
new member
 
Join Date: Dec 2009
Posts: 5
Default

Thanks, and apologies. Don't kow how I ended up in the wrong area...
Reply With Quote

  #8 (permalink)  
Old 03-01-10, 05:29 PM
System Admin
 
Join Date: Jan 2010
Posts: 7
Post

You will need to add your local machine IP under cPanel >> Remote Mysql , then try to access the database with port : 3306 .
Reply With Quote

  #9 (permalink)  
Old 03-01-10, 06:46 PM
new member
 
Join Date: Dec 2009
Posts: 5
Default

Brilliant Patrick, that did it. Thank you.

C
Reply With Quote

  #10 (permalink)  
Old 03-01-10, 06:53 PM
System Admin
 
Join Date: Jan 2010
Posts: 7
Smile

Good to hear that it worked for you .
Reply With Quote

Reply

Tags
odbc connection

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT. The time now is 02:20 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 2001-2010 Web Hosting UK. All rights reserved.
Web Hosting UK Forum





Site Map

Shared Cloud
Shared Cloud From £1

Affiliate Program
Earn up to £300 Per Sale

Dedicated Servers
Dedicated Server Hosting

Cloud Hosting
Cloud Server Hosting

Load Balanced Server
Load Balancing Server

VPS Hosting
Linux VPS Hosting

Windows VPS
Windows 2003 VPS

Zimbra Hosting
Zimbra Email Hosting

cPanel Hosting
Shared Linux Hosting

Windows Hosting
Shared Windows Hosting

Coldfusion Hosting
Windows Coldfusion Hosting

cPanel Reseller Hosting
Shared Windows Hosting

Windows Reseller
Windows Reseller Hosting

Email Web Hosting
Email Hosting

Semi-Dedicated Server
Semi-Dedicated Hosting

Remote Backup Plans
Offsite Backup Service


cpanel hosting
Knowledgebase Articles

Pre-Sales Question
Web Hosting FAQ's

Dedicated Hosting
Dedicated Server FAQ's

Virtual Private Servers
VPS Hosting

PHP MySQL Hosting
cPanel Hosting

Windows Hosting
ASP MSSQL Hosting

Domain Name
Domain registration FAQ's

CMS Hosting
CMS Hosting FAQ's

Payment Gateways
Payment FAQ's


Support Tutorials

cPanel Tutorials
cPanel Flash Tutorials

Wordpress Tutorials
Wordpress Flash Tutorials

Plesk Tutorials
Plesk Flash Tutorials

PhpMyadmin Tutorials
PhpMyadmin Flash Tutorials

Drupal Tutorials
Drupal Flash Tutorials

Mambo Tutorials
Mambo Flash Tutorials

Joomla Tutorials
Joomla Flash Tutorials

More Hosting Tutorials