webERP Forum
problem loading sql into new database - Printable Version

+- webERP Forum (http://www.weberp.org/forum)
+-- Forum: webERP Discussion (http://www.weberp.org/forum/forumdisplay.php?fid=1)
+--- Forum: Installation Issues (http://www.weberp.org/forum/forumdisplay.php?fid=13)
+--- Thread: problem loading sql into new database (/showthread.php?tid=2540)

Pages: 1 2


problem loading sql into new database - opto - 08-10-2015

when loading old sql (MySQL 5.?) into a new one (Bitnami stack 5.5), I get the following sql error:

any idea what this means?

any help is appreciated,

Klaus

SQL query:


--
-- Constraints for table `chartdetails`
--
ALTER TABLE `chartdetails`
ADD CONSTRAINT `chartdetails_ibfk_1` FOREIGN KEY (`accountcode`) REFERENCES `chartmaster` (`accountcode`),
ADD CONSTRAINT `chartdetails_ibfk_2` FOREIGN KEY (`period`) REFERENCES `periods` (`periodno`);



MySQL said: Documentation
#1452 - Cannot add or update a child row: a foreign key constraint fails (`we_150809`.`#sql-acc_36`, CONSTRAINT `chartdetails_ibfk_2` FOREIGN KEY (`period`) REFERENCES `periods` (`periodno`))


RE: problem loading sql into new database - TimSchofield - 08-10-2015

Hi Klaus, foreign key checks should be set off, so

SET foreign_key_checks = 0;

should appear at the beginning of the file, can you check this is there?

Tim


RE: problem loading sql into new database - opto - 08-10-2015

(08-10-2015, 05:34 AM)falkoner Wrote: Hi Klaus, foreign key checks should be set off, so

SET foreign_key_checks = 0;

should appear at the beginning of the file, can you check this is there?

Tim

thanks Tim, I do not have that and will try whether it solves the import problem.

Klaus




RE: problem loading sql into new database - opto - 08-12-2015

Hi Tim, got that working by using MySQL workbench instead of phpmyadmin. With the latter, I also had utf8 problems on another oSS project.

I copied all code to new webserver, and imported the database.
Now, I can choose company and 'log in', but am directed to a white page:
The website cannot display the page, http 500.

Do you have any idea what is wrong? Do I need to change path to company directory somewhere?

Thanks,

Klaus


RE: problem loading sql into new database - agaluski - 08-12-2015

Are you being redirected to Dashboard.php? Or is the error before that?



RE: problem loading sql into new database - opto - 08-12-2015

(08-12-2015, 02:03 AM)agaluski Wrote: Are you being redirected to Dashboard.php? Or is the error before that?

just a White page with thetext I mentioned. No indication where that Comes from.
Is the path of companies Directory hardcoded somewhere, or in the db?




RE: problem loading sql into new database - agaluski - 08-12-2015

I think you can tell which page is giving you the error by looking in the URL of the browser
Do you have access to the web server log files?
Have you checked the config.php file to ensure correct Database name, user and password?




RE: problem loading sql into new database - opto - 08-12-2015

thanks.

yes, db etc should be ok - works on the other websoftware which I transfered.
it dies on http://opw2/weneu/index.php - so no clear indication what goes wrong.


RE: problem loading sql into new database - agaluski - 08-12-2015

Do you have access to the web server log files? I am guessing the logs would give the error message.


RE: problem loading sql into new database - takasimurah - 08-12-2015

dear all

I have problem with database sample, some module weberp can't use below. I hope get resolve from you're. thanks