Skip navigation
TjmSmith
Currently Being Moderated

Developing Database connection using DW

Jul 13, 2013 10:55 PM

Just had a horrendous Friday trying to connect to my MySQL database having used DW's wizard.

 

DW's wizard made the connection on my local testing server and I was able to connect with no problem.  However, when I uploaded the files to my live host, the php page would not make the connection.  I finally noted that DW automatically created the folder 'Connections' and the string ../Connections/connection_name.php but I created the folder on the live host as 'connections' (note the change in capitalization!).  Reminder that unix based system (live host) is not forgiving of capitalization.  Further reminder to check the connection string in all of your php pages for capitalization differences.

 

Another problem was the database name and username.  My host uses Cpanel and requires the database and username to be preceded by my Cpanel login name with an underscore separating the two:
(eg,
$database_abcdef = "mycpanellogin_mydatabasename";
$username_abcdef = "mycpanellogin_mydatabaseusername";

 

 

Regards,

Tom Smith

 
Replies
  • Currently Being Moderated
    Jul 13, 2013 11:06 PM   in reply to TjmSmith

    TjmSmith wrote:

     

    but I created the folder on the live host as 'connections' (note the change in capitalization!).  Reminder that unix based system (live host) is not forgiving of capitalization.  Further reminder to check the connection string in all of your php pages for capitalization differences.

     

     

    Why didn't you just upload the local 'Connectons' folder? Unless you're saying cap 'C' is not recognised by your remote server.

     

     

    TjmSmith wrote:

     

    Another problem was the database name and username.  My host uses Cpanel and requires the database and username to be preceded by my Cpanel login name with an underscore separating the two:
    (eg,
    $database_abcdef = "mycpanellogin_mydatabasename";
    $username_abcdef = "mycpanellogin_mydatabaseusername";

     

     

     

    That's another issue you DO have to be vigilant about. Nearly always you have to amend the remote database connection details as host servers have their own specific requests of what is accepted and what is not

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points