Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Database error from WebERP
View previous topic :: View next topic  
Author Message
toothandnail
Member


Joined: 17 Mar 2011
Posts: 63
Location: Oxfordshire, UK

PostPosted: Wed May 15, 2013 9:43 pm    Post subject: Database error from WebERP Reply with quote

I've just gone set up a more complete backup of my SMS server. I've been using synbak for backups for a while, but realised that I wasn't backing up any of the mysql databases. So I've added a few extra steps to the backup to ensure I've got mysql backups. I'm using this at the moment:

Code:
#!/bin/bash
# Run backup routines.
mysqldump -u root -pxxxxxxx --all-databases -f --compact > /home/data/all-database.sql
synbak -s sms -m tar -M gz
rm /home/data/all-database.sql


Running that produces errors from mysqldump:

Code:
mysqldump: Got error: 1146: Table 'weberp.internalstockcatrole' doesn't exist when using LOCK TABLES
Error: Couldn't read status information for table internalstockcatrole ()
mysqldump: Couldn't execute 'show create table `internalstockcatrole`': Table 'weberp.internalstockcatrole' doesn't exist (1146)


I'm not very familiar with the database structure used by WebERP (though I'm hoping to become much more familiar - learning how to set up and use WebERP is high on my to-do list).

The error may be simply because the demo database isn't populated, but I'd like to make sure that when I generate a new company database it works without this sort of error. So I'm wondering if anyone else has tried using mysqldump to dump the existing databases and seen any similar errors, or whether anyone has enough experience with WebERP to know what is needed to fix it?

Also, I'm wondering if the slackbuild for WebERP is available - I would like to try building the most recent version to see if the error persists.

Paul.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Wed May 15, 2013 10:23 pm    Post subject: Reply with quote

I had no problem mysqldump weberp database, table seem correct...

Code:
mysql> check table internalstockcatrole;
+-----------------------------+-------+----------+----------+
| Table                       | Op    | Msg_type | Msg_text |
+-----------------------------+-------+----------+----------+
| weberp.internalstockcatrole | check | status   | OK       |
+-----------------------------+-------+----------+----------+
1 row in set (0.00 sec)


There is no slackbuild as weberp is one of the package I manually maintain...

To upgrade just rename your weberp in /var/www/htdocs and extract the new and restore config.php
Weberp automatically upon login will inform you about upgrade...

If you want to re install database just delete and import a fresh one...
Code:
mysql -e "drop database weberp;create database weberp;"
mysql -uroot  -D weberp < /var/www/htdocs/[webERP]/sql/mysql/weberp-new.sql
mysql -uroot  -D weberp < /var/www/htdocs/[webERP]/sql/mysql/weberp-demo.sql


gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
toothandnail
Member


Joined: 17 Mar 2011
Posts: 63
Location: Oxfordshire, UK

PostPosted: Thu May 16, 2013 12:15 am    Post subject: Reply with quote

Thanks. Looks as though I've got something screwed up in my mysql setup.

Tried your first command, but this is what I get:

Code:
root@sms:~# mysql -e "drop database weberp;create database weberp;"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


I then tried to log into mysql, but I keep getting errors, even though mysqldump works with the password that I set for mysql.

Is there a way of reinitializing the mysql setup? Or could I uninstall mysql completely and restore it from the iso package?

Paul.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Thu May 16, 2013 1:30 am    Post subject: Reply with quote

No thats my bad, you need to pass the -p option to prompt for password or pass the password like you do with mysqldump (-pxxx)...

Code:
mysql -p -e "drop database weberp;create database weberp;"
mysql -uroot  -p -D weberp < /var/www/htdocs/[webERP]/sql/mysql/weberp-new.sql
mysql -uroot -p -D weberp < /var/www/htdocs/[webERP]/sql/mysql/weberp-demo.sql

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
toothandnail
Member


Joined: 17 Mar 2011
Posts: 63
Location: Oxfordshire, UK

PostPosted: Thu May 16, 2013 5:41 pm    Post subject: Reply with quote

Very Happy Thanks! That did it. After regenerating the database, the error is gone.

Now all I need to do is work out how to construct a good blank database and see if I can get a real company workiing.

Thanks again for the help.

Paul.
Back to top
View user's profile Send private message
toothandnail
Member


Joined: 17 Mar 2011
Posts: 63
Location: Oxfordshire, UK

PostPosted: Thu May 16, 2013 9:43 pm    Post subject: Reply with quote

Just as a follow up to this. I installed a copy of SMS 2.0.3 on an HP Proliant Miniserver a few days ago ( Smile there'll be a donation on its way when I get paid for the job). Its intended to be a backup server and also to provide access to things like webERP.

I've just finished setting up backups on it (its going to be installed on site tomorrow) and found mysqldump was reporting exactly the same problem on it.

Also checked a machine I installed a few months ago, and found it is also showing the same error on the webERP database. I've fixed them all, but it looks as though something isn't working quite right on install.

Paul.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Fri May 17, 2013 8:49 pm    Post subject: Reply with quote

Thanks for the bug report..
I check a new installation and indeed table seems corrupted, I'll reinstall the database and update weberp as well..

Thanks again...

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
toothandnail
Member


Joined: 17 Mar 2011
Posts: 63
Location: Oxfordshire, UK

PostPosted: Sun May 19, 2013 9:11 pm    Post subject: Reply with quote

gerasimos_h wrote:
Thanks for the bug report..
I check a new installation and indeed table seems corrupted, I'll reinstall the database and update weberp as well..

Thanks again...

gerasimos_h


You're welcome. I'll be interested to see the update.

I'm currently having problems establishing new databases for webERP. I've tried to follow the online documentation, but it hasn't helped. I've also done a bit of searching, came up with this:

http://development.alpha-delta-alpha-mu.com/index.php?itemid=6

Unfortunately, so far, I've failed dismally creating the new database. The script specified in the docs Z_Createcompany.php fails to run, but doesn't do the whole job even if I modify the permissions to match the apache user.

Smile I'm currently struggling through the MySQL documentation, but I've not found much that helps with the immediate problem.

Not to mention that there seem to be places where either Melbourne or Toronto are hard coded in...

Regards, Paul.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional