简体   繁体   English

将数据库导入phpmyadmin#1044 - 拒绝用户访问

[英]importing a database into phpmyadmin #1044 - Access denied for user

I have recently purchased web hosting service at godaddy. 我最近在godaddy购买了网络托管服务。 I have already completed my project and i used xampp. 我已经完成了我的项目,我使用了xampp。 Now i want to import the database which i arleady have. 现在我想导入我所拥有的数据库。 I tried to do it in the normal way by clicking on import and choosing the file. 我试图通过单击导入并选择文件以正常方式执行此操作。 But i'm getting this error 但是我收到了这个错误

#1044  - 用户'gopal'@'%'访问被拒绝到数据库'socialnew'

How can I fix this? 我怎样才能解决这个问题?

Many web hosts only give you access to one database. 许多Web主机只允许您访问一个数据库。 Your SQL file is trying to create a new database (with a line near the top like CREATE DATABASE `socialnew`... as you see in the error message). 您的SQL文件正在尝试创建一个新数据库(在顶部附近有一行如CREATE DATABASE `socialnew`...正如您在错误消息中看到的那样)。

The likely solution is to not create the database from your script. 可能的解决方案是不从脚本创建数据库。 You can either edit the .sql file manually and remove the lines starting with CREATE DATABASE `socialnew`... and USE `socialnew`; 您可以手动编辑.sql文件,并删除以CREATE DATABASE `socialnew`...CREATE DATABASE `socialnew`...开头的行USE `socialnew`; , or, if your phpMyAdmin is pretty up-to-date, you could do the export again from your XAMPP and make sure the checkbox is not selected for "Add CREATE DATABASE / USE statement". ,或者,如果您的phpMyAdmin是最新的,您可以从XAMPP再次导出,并确保未选中“添加CREATE DATABASE / USE语句”复选框。

Then when doing the import, make sure you're selecting the Import tab from within the database you wish to import to. 然后在执行导入时,请确保从要导入的数据库中选择“导入”选项卡。

您也可以在IDE中打开.sql文件,然后删除create命令。然后,假设您已经导航到phpMyAdmin中所需的数据库导入部分,您可以使用修改后的文件运行导入,您应该很高兴去。

Must Ensure that your User_Name, Password and Database name are correct. 必须确保您的User_Name,密码和数据库名称正确无误。 If you are Deal with database 'sampled' then type 'sampled' in query instead of 'db' also must ensure that you don't have to use quota(') in Statement. 如果您正在处理数据库'samples',那么在查询中键入'sampled'而不是'db'也必须确保您不必在Statement中使用quota(')。 For More and Accurate Detail visit Following link: http://onephin.com/1044-access-denied-user-user_namelocalhost-database-database_name/ 详细信息请访问以下链接: http//onephin.com/1044-access-denied-user-user_namelocalhost-database-database_name/

Export and import just tables of the database: 仅导出和导入数据库的表:

-> open the database in phpmyadmin - >在phpmyadmin中打开数据库
-> click to export - >点击导出
-> save the file (you don't have to change any settings) - >保存文件(您不必更改任何设置)
-> open the database on new server - >在新服务器上打开数据库
-> click to import - >点击导入
-> chose the file - >选择了文件
-> click to "GO" and you are done... - >点击“开始”,你就完成了......

It was working for me :-) 它对我有用:-)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 phpMyAdmin-#1044-用户被拒绝访问 - phpMyAdmin - #1044 - Access denied for user 将数据库导入phpmyadmin#1044-用户无法编辑文件而拒绝访问 - importing a database into phpmyadmin #1044 - Access denied for user Can't Edit File 错误 1044 拒绝用户 ''@'localhost' 访问数据库 - Error 1044 access denied for user ''@'localhost' to database SQLSTATE [HY000] [1044]当用户'@'localhost'上传到PhpMyAdmin数据库表时,访问被拒绝 - SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' when uploading to PhpMyAdmin database table 错误代码:1044:用户''''%'访问被拒绝到数据库 - Error Code: 1044: Access denied for user ' ' '@' '%' to database Mysql在console / phpmyadmin上显示错误:错误1044(42000):用户'root'@'localhost'对数据库'test123'的访问被拒绝 - Mysql showing error on console/phpmyadmin : ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'test123' `1044 (42000): 用户 'user_admin'@'%' 对数据库 'mysql' 的访问被拒绝 - `1044 (42000): Access denied for user 'user_admin'@'%' to database 'mysql'` 1044 - 用户 'user'@'localhost' 拒绝访问数据库 'db' - 1044 - Access denied for user 'user'@'localhost' to database 'db' MySQL 1044(42000):使用Mac对用户'@'localhost'到数据库'mysql'的访问被拒绝 - MySQL 1044 (42000): Access denied for user ' '@'localhost' to database 'mysql' with Mac 无法从Zapier#1044连接到数据库-用户被拒绝访问 - cannot connect to database from zapier #1044 - Access denied for user
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM