Access denied importing database 1044

Created database epiz_34312704_ptm, then trying importin original db, error. >I assume the CREATE if no exists should not be there? How can I avoid the problem?

Website URL

ptm.000.pe

WEBSITE IP

185.27.134.137

Error Message

Other Information

SQL query:


--
-- Database: `piccolot93181`
--
CREATE DATABASE IF NOT EXISTS `piccolot93181` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci
```

**MySQL said:** [![Documentation](http://185.27.134.10/themes/dot.gif "Documentation")](http://185.27.134.10/url.php?url=https%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.7%2Fen%2Ferror-messages-server.html)

`#1044 - Access denied for user 'epiz_34312704'@'192.168.%' to database 'piccolot93181'`

(other information and details relevant to your question)

Rename database to something more suitable for free hosting

Databases on free hosting are of this format : epiz_34312704_XXX

3 Likes

Easier said than done. I cannot rename the original db. Can I rename it in the exported sql file, or remove the CREATE db altogether?

Since you already created

Just rename

to

CREATE DATABASE IF NOT EXISTS epiz_34312704_ptm

Replace all piccolot93181 to epiz_34312704_ptm

2 Likes

You cannot run the “CREATE DATABASE” command on free hosting. You need to create the database under the “MySQL Databases” in the control panel.

3 Likes

I remember a similar situation from someone else fairly recently. I wrote this post for them with some workaround steps. They should work for you too.

3 Likes

All right, thank you very much. I managed to comment out the CREATE statement in the exported sql file, and the import procedure worked.

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.