简体   繁体   中英

Pushing data to cleardb Heroku via mysql workbench throwing error

ERROR 1044 (42000) at line 1: Access denied for user 'user_name_of_cleardb_at_heroku'@'%' to database 'i_am_uploading'

I dumped data from my localhost to a dump folder via mysql workbench. I'm uploading the same dump filer data to heroku. I'm getting this error. I made the server instance successfully ?

What exactly is the problem ? How can I debug ?

Heroku don't allow you to create a new database.

When creating tables don't forget to use the user name in front of the table name just like:

CREATE TABLE heroku_7036ce5029e34fc.usuarios( user_id INT NOT NULL AUTO_INCREMENT, user_first_name VARCHAR(100) NOT NULL, user_last_name VARCHAR(100) NOT NULL, user_email VARCHAR(100) NOT NULL, user_password VARCHAR(100) NOT NULL, user_phone VARCHAR(20) NOT NULL, PRIMARY KEY ( user_id ) );

if you are using a script try to include the user name in every statement.

The error message says it clearly. The user user_name_of_cleardb_at_heroku does not have the rights to act on the db 'i_am_uploading'. So first grant rights to that user and then try again. Alternatively use a user with the proper rights. See http://dev.mysql.com/doc/refman/5.6/en/grant.html for the syntax of GRANT. You probably need something like:

grant all on i_am_uploading.* to user_name_of_cleardb_at_heroku@%;

You need to run this with a user who has rights to grant privileges.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM