将数据库导入phpmyadmin#1044-用户被拒绝访问 [英] importing a database into phpmyadmin #1044 - Access denied for user

查看:250
本文介绍了将数据库导入phpmyadmin#1044-用户被拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在godaddy购买了虚拟主机服务.我已经完成了我的项目,并且使用了xampp.现在,我想导入我有毒的数据库.我尝试通过单击导入并选择文件以正常方式进行操作.但是我遇到了这个错误

我该如何解决?

解决方案

许多Web主机仅允许您访问一个数据库.您的SQL文件正在尝试创建一个新的数据库(错误消息中的顶部靠近CREATE DATABASE `socialnew`...这样的行).

可能的解决方案是不从脚本创建数据库.您可以手动编辑.sql文件并删除以CREATE DATABASE `socialnew`...USE `socialnew`;开头的行,或者,如果phpMyAdmin是最新的,则可以再次从XAMPP进行导出,并确保选中该复选框.未为添加CREATE DATABASE/USE语句"选择.

然后,在执行导入时,请确保要从要导入到的数据库中选择导入"选项卡.

I have recently purchased web hosting service at godaddy. I have already completed my project and i used 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

How can I fix this?

解决方案

Many web hosts only give you access to one database. 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).

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`;, 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".

Then when doing the import, make sure you're selecting the Import tab from within the database you wish to import to.

这篇关于将数据库导入phpmyadmin#1044-用户被拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆