View previous topic :: View next topic |
Author |
Message |
toothandnail Member
Joined: 17 Mar 2011 Posts: 63 Location: Oxfordshire, UK
|
Posted: Wed May 15, 2013 9:43 pm Post subject: Database error from WebERP |
|
|
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 |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed May 15, 2013 10:23 pm Post subject: |
|
|
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 |
|
toothandnail Member
Joined: 17 Mar 2011 Posts: 63 Location: Oxfordshire, UK
|
Posted: Thu May 16, 2013 12:15 am Post subject: |
|
|
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 |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Thu May 16, 2013 1:30 am Post subject: |
|
|
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 |
|
toothandnail Member
Joined: 17 Mar 2011 Posts: 63 Location: Oxfordshire, UK
|
Posted: Thu May 16, 2013 5:41 pm Post subject: |
|
|
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 |
|
toothandnail Member
Joined: 17 Mar 2011 Posts: 63 Location: Oxfordshire, UK
|
Posted: Thu May 16, 2013 9:43 pm Post subject: |
|
|
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 ( 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 |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Fri May 17, 2013 8:49 pm Post subject: |
|
|
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 |
|
toothandnail Member
Joined: 17 Mar 2011 Posts: 63 Location: Oxfordshire, UK
|
Posted: Sun May 19, 2013 9:11 pm Post subject: |
|
|
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.
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 |
|
|