0

On ubuntu, I am trying to deploy an app on GAE python. I have also connected mysql client to it through these lines:

if (os.getenv('SERVER_SOFTWARE') and os.getenv('SERVER_SOFTWARE').startswith('Google App Engine/')):
                db = MySQLdb.connect(unix_socket='/cloudsql/' + _INSTANCE_NAME, db='databaselab', user= 'root')

where in mysql 5.6, I have create a database named 'databaselab'. But the error on deploying it on GAE shows:

OperationalError: (1049, "Unknown database 'databaselab'")

But when I replace 'databaselab' with predefined tables 'mysql', everything works fine. But then I thought to create required tables in 'mysql' database as I was able to access that database. But then error comes

Error: (1146, "mysql.table_name doesn't exist")

i.e I am able to access only predifined tables naming 'mysql', 'information_schema' and 'performance_schema'. Rest other databases and new tables defined in predefined databases are unknown to GAE although all those databases and tables exist.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| databaselab       |
| mysql              |
| performance_schema |
+--------------------+

How to resolve this ?

6
  • @MySQLRockstar Which privileges I need to grant then to be accessed? I have created the tables by just "CREATE DATABASE " statement and tables also likewise.
    – priya_ajju
    Commented Apr 10, 2015 at 19:36
  • I would say you have a typo on your settings with database name: db='databaselab' should be db='databaselabb'
    – Anzel
    Commented Apr 10, 2015 at 19:39
  • @Anzel No, actually in the question here only i did this typo. otherwise, everywhere its 'databaselab' only.
    – priya_ajju
    Commented Apr 10, 2015 at 19:53
  • Have you checked the user/database permissions are correct?
    – Anzel
    Commented Apr 10, 2015 at 19:57
  • @Anzel on mysql now I did grant all privileges on databaselab.* to 'root'@'localhost' identified by 'mypass'; but still same error
    – priya_ajju
    Commented Apr 10, 2015 at 20:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.