PDA

View Full Version : SQL Error 2


vinceg
06-15-2016, 03:52 PM
Hi All

Getting this SQL error after a server move, that username in the error isn't anything to do with the new DB. How can I fix?

atabase error in vBulletin 4.2.2:

Invalid SQL:

UPDATE cache
SET locktime = 1466012729
WHERE cacheid = 'vbcms_item_1_data';

MySQL Error : UPDATE command denied to user 'uv4_1010150_0001'@'linweb2.atlas.pipex.net' for table 'cache'
Error Number : 1142
Request Date : Wednesday, June 15th 2016 @ 06:45:29 PM
Error Date : Wednesday, June 15th 2016 @ 06:45:29 PM
Script : http://www.microlightforum.com/content.php
Referrer :
IP Address : 192.243.55.137
Username : Unregistered
Classname : vB_Database
MySQL Version :

Stack Trace:

#0 vB_Database->halt() called in [path]/includes/class_core.php on line 426
#1 vB_Database->execute_query() called in [path]/includes/class_core.php on line 444
#2 vB_Database->query_write() called in [path]/vb/cache/db.php on line 254
#3 vB_Cache_Db->lock() called in [path]/vb/cache.php on line 371
#4 vB_Cache->read() called in [path]/packages/vbcms/item/content.php on line 1038
#5 vBCms_Item_Content->loadCache() called in [path]/packages/vbcms/item/content.php on line 538
#6 vBCms_Item_Content->setItemId() called in [path]/vb/model.php on line 211
#7 vB_Model->__construct() called in [path]/vb/item/content.php on line 108
#8 vB_Item_Content->__construct() called in [path]/packages/vbcms/item/content.php on line 576
#9 vBCms_Item_Content->__construct() called in [path]/packages/vbcms/controller.php on line 119
#10 vBCms_Controller->initialize() called in [path]/packages/vbcms/controller/content.php on line 76
#11 vBCms_Controller_Content->initialize() called in [path]/packages/vbcms/controller.php on line 90
#12 vBCms_Controller->__construct() called in [path]/vb/router.php on line 678
#13 vB_Router::getActionController() called in [path]/packages/vbcms/route/content.php on line 87
#14 vBCms_Route_Content->getResponse() called in [path]/vb/router.php on line 251
#15 vB_Router::getResponse() called in [path]/vb/bootstrap.php on line 58
#16 require_once([path]/vb/bootstrap.php) called in [path]/content.php on line 30

Dragonsys
06-15-2016, 03:56 PM
MySQL Error : UPDATE command denied to user 'uv4_1010150_0001'@'linweb2.atlas.pipex.net' for table 'cache'

looks like the user for your DB doesn't have update permissions

vinceg
06-15-2016, 05:10 PM
This is what I'm saying, it's references to the old DB on the OLD server.

squidsk
06-15-2016, 05:12 PM
Check that the mysql information in config.php is correct and corresponds to the server/database/user/password for the new server.

vinceg
06-15-2016, 05:16 PM
I will check but surely it must be because the site is up?

--------------- Added 1466018458 at 1466018458 ---------------

Sorry, re-read what you said.

I have now added full path in config.php but still getting email errors sent.

Dragonsys
06-15-2016, 05:22 PM
does VBCMS have a separate config?

squidsk
06-15-2016, 05:25 PM
If that's the user from the error message then you have that set as the mysql user in config.php and that needs to be updated to the new user for the new server.

vinceg
06-15-2016, 06:14 PM
No, the user is MYSQL the new server.

I can't see a config for vB CMS.

I'm out of ideas!

BirdOPrey5
06-15-2016, 06:45 PM
Are you sure the error isn't coming from the old server? Have the files been deleted from the old server. That is about the only explanation.

No such thing as separate config.php for the CMS.

TheLastSuperman
06-15-2016, 09:16 PM
Were you previously hosted with GoDaddy? If so look for these lines in the config.php:

// ****** MASTER DATABASE SERVER NAME AND PORT ******
// This is the hostname or IP address and port of the database server.
// If you are unsure of what to put here, leave the default values.
//
// Note: If you are using IIS 7+ and MySQL is on the same machine, you
// need to use 127.0.0.1 instead of localhost
$config['MasterServer']['servername'] = 'localhost';
$config['MasterServer']['port'] = 3306;


Is yours set to localhost as shown or is it set to linweb2.atlas.pipex.net?

If it's set to localhost then it's more than likely as Joe (BirdOfPrey) stated above.
If it's set to linweb2.atlas.pipex.net then simply change to localhost as shown in the code example AND ensure the new database name, database user+password are correct in the config.php file and re-upload to /includes/ then check.

vinceg
06-16-2016, 01:40 PM
BirdofPrey nailed it, old files still on server.

Thanks all!