Jump to content

Can't install script because of connection to old database


Go to solution Solved by jay5009,

Recommended Posts

I'm a newb.  I uploaded and installed a script and inserted the correct info to direct it to my MySQL database.  Then I deleted all of it but then later decided to upload and install that same script again.  The installation file is an install.php file contained in an 'install' folder.  After directing my browser to install.php again it came up with a bunch of MySQL errors and will not let me install again.  I then deleted that MySQL database and created a new one and also once again deleted everything and again re-uploaded the script.  Once again it comes up with a bunch of MySQL errors and will not let me install.  The errors look like this: "Warning: SK_MySQL::connect() database connection failed in /home/content/...API/MySQL.class.php on line 17" and "Warning: mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/content/...API/MySQL.class.php on line 35".

 

It looks like it's trying to connect to that old database but how can it possibly be trying to do that if I deleted that old database and deleted everything on my site and re-uploaded a fresh script that has no connection or knowledge of that old database?  I'm assuming there must be some file left on my site that I was not able to delete.  I'm using Godaddy and I simply went into the FTP page and deleted everything on my site and even tried restoring the site to when I first obtained my hosting account.  

 

 

there's nothing in the errors that are specific to the database name. the SK_MySQL part is a class name. it may have been the same name as the database name, but that's not the reason for it appearing in the error message.

 

the only thing that the error you posted tells is that the connection is failing. to find out specifically why it is failing, you would need to echo mysql_error();

Edited by mac_gyver
  • Solution

there's nothing in the errors that are specific to the database name. the SK_MySQL part is a class name. it may have been the same name as the database name, but that's not the reason for it appearing in the error message.

 

the only thing that the error you posted tells is that the connection is failing. to find out specifically why it is failing, you would need to echo mysql_error();

 

Thanks.  It's working now but I don't know why it wasn't working before.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.