importing a database into phpmyadmin #1044 - Access denied for user(将数据库导入 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 - 用户访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将数据库导入 phpmyadmin #1044 - 用户访问被拒绝
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 更改自动增量起始编号? 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- SQL 临时表问题 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 在SQL中,如何为每个组选择前2行 2021-01-01
