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

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

问题描述

我最近在 Godaddy 购买了网络托管服务.我已经完成了我的项目并且我使用了 xampp.现在我想导入我已经拥有的数据库.我尝试通过单击导入并选择文件以正常方式执行此操作.但我收到此错误

我该如何解决这个问题?

解决方案

许多网络主机只允许您访问一个数据库.您的 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天全站免登陆