1

I'm developing an API with Nodejs and I have a create project endpoint and a create patient endpoint. Both of them work if I create the database tables with mySql.

But I need to run first create project which creates some tables to be used by create user endpoint. The problem comes when I call user endpoint and throws this:

** Connection to project psapp_demo successfully.
*** Error: ER_NO_SUCH_TABLE: Table 'psapp_demo_proposa58_pr.displayer_patient' doesn't exist

But database psapp_demo_proposa58_pr and table displayer_patient exist and are accessible throw PHPmyadmin.

Code for creating a new patient is based on a promise which is catching the error:

Services.user.create(connection,req,userId,req.body,clinicId)
.then((userId) => { req.userId = userId; next() })
.fail((err) => next(err))

Anyway, database created with a project endpoint also does not work with phpmyadmin so problem seems to realy on the database, not the code. This is the error where you can see I can even navigate with phpmyadmin throw that databases but are not located when I try to insert something:

enter image description here

A SELECT operation throws empty which is right. With a SELECT, there is not error.

Do you know why could it be happening? Thanks

B001ᛦ
  • 2,036
  • 6
  • 23
  • 31
Joss
  • 535
  • 1
  • 8
  • 28
  • No I'm not, as you can see in the image, even with the db showing in the tree and accessing to the create new register, but it throws an error – Joss Jul 08 '16 at 09:08
  • 2
    Possible duplicate of [MySQL > Table doesn't exist. But it does (or it should)](http://stackoverflow.com/questions/7759170/mysql-table-doesnt-exist-but-it-does-or-it-should) – Shadow Jul 08 '16 at 09:15
  • Have you restarted the sql server? – B001ᛦ Jul 08 '16 at 09:17

0 Answers0