Jump to content

Database Error.


Nik Grey

Recommended Posts

I realise that this is probably NOT a Cubecart issue but at the moment I am populating my Cubecart - I am adding about 30 products a day and every so often I get this error:

 

*************

 

Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2003): Can't connect to MySQL server on 'mysql1065.servage.net' (110) in /mounted-storage/home60b/sub002/sc32225-NWDH/greyprint.co.uk/classes/db/mysqli.class.php on line 22

Fatal error: Can't connect to MySQL server on 'mysql1065.servage.net' (110) in /mounted-storage/home60b/sub002/sc32225-NWDH/greyprint.co.uk/classes/db/mysqli.class.php on line 24

 

**************

 

If I leave it for a while I can get back into my admin section, I then Rebuild the database (selecting everything) and it all works as expected again.

 

I am with Servage, any idea's ?

Link to comment
Share on other sites

Hi

As bsmither says, this is certainly not a normal error to be getting and indicates a problem with the hosting - the mysql server that is hosting your database is either seriously overloaded or has very poor uptime. Either way it is not a good situation before you are live with your store and is a lot more common with the big hosting companies that offer very cheap unlimited everything hosting plans (which obviously dont exist in reality but are a marketing exercise !)

Consistent problems like this when you are live will result in poor Google rankings, a slow website and if your customers experience an error like that, they will not buy and are unlikely to return.

Thanks

Ian

Link to comment
Share on other sites

I agree with Ian. It may be that you need a more serious web hosting account. Your hosting company won't disclose such information to you but you may find that your remote database server is working for hundreds of other websites. It only takes one with bad code to affect all the others. 

 

I'd recommend a Virtual Private Server or Dedicated server. Or just a company who guarantee available resources. 

Link to comment
Share on other sites

Just sent in a ticket to the host, what you all said above concerns me - after all I have been through the last thing I want is an unreliable host. I have been using these for years and have a few sites on it, One commercial one I know has quite a bit of traffic. will see what they say.

Link to comment
Share on other sites

OK, how can I answer the bit in bold:

 

I have checked website and it shows offline page. In order to replicate the problem at our end can you please provide us the exact steps and also all the details related to it.

I also request you to please check your scripts where you have mentioned the account path and check whether they are altered with

/home60b/sub002/sc32225-NWDH

 

Link to comment
Share on other sites

A very good question as they obviously dont have a clue about CubeCart (which doesnt use absolute paths) or the nature of the problem - even if a path to the home directory was wrong, that would stop CubeCart from working at all, ever.  You are experiencing problems connecting to the database server - cheap hosting also unfortunately often means poor support - you get what you pay for !

 

Thanks

Ian

Link to comment
Share on other sites

Most hosting companies are not in a position to provide support for the software running on their system which is completely understandable. They can't know everything. 

Of course I agree that hosting companies cannot support the huge range of application software that exists out there and that is why a small but increasing number of hosting companies like us specialise and provide a level of managed hosting including support.   However, the main problem here is that when the user is reporting that type of error, you wouldn't expect the response that he received - it makes no difference what application is being run !

Link to comment
Share on other sites

Just had another error:

 

Notice: `name` is not allowed as a key in 'CubeCart_config' table! in /mounted-storage/home60b/sub002/sc32225-NWDH/greyprint.co.uk/classes/db/database.class.php on line 794

 

I had just added another product, I am not trying to do anything unusual.

Link to comment
Share on other sites

CubeCart, for the most part, makes sure there are names of columns in the database table that match the column names in the query. For example:

SELECT 'id' FROM CC_inventory;

 

CubeCart will first ask the database for a set of all the columns in the CC_inventory table. With that set, CubeCart then goes through all the columns in the query (such as 'id') and removes any columns mentioned in the query that does not have a matching column name in the table. This prevents any "Database Error: Column 'id' not found." from displaying to the customer.

 

But, what happens when CubeCart cannot connect to the database when asking for the set of names of the columns? CubeCart does not perfectly handle that situation. CubeCart will not have the proper data type when comparing the array of column names in the query to the array of the names of the columns from the database.

 

So, the comparison function fails (which is not the same as returning false) and CubeCart falls through to where it believes 'id' (or 'name', in your case) is not a valid column name (a 'key' in programmer's lingo).

 

This is a direct result of CubeCart not getting the names of the columns in the table from the database. Why no names? It could be because PHP could not connect to the database, or the database table has crashed.

 

(MySQL has a specific command to repair a crashed table. So the people who wrote MySQL knows that tables crash. I assume they do not yet know how to prevent that from happening.)

Link to comment
Share on other sites

  • 5 months later...

Welcome psyops70! Glad to see you made it top the forum.

 

We would ask that you log in to your hosting account control panel (cPanel? Plesk?) and view the MySQL database parameters.

 

Did you have a prior installation of CC4 on this server?

Link to comment
Share on other sites

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.   Paste as plain text instead

  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...