热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如果不存在,导入数据库错误创建数据库-importingdatabaseerrorCREATEDATABASEIFNOTEXISTS

whenIimportmydatabasetomyhost(phpmyadmin)Igetthiserrormessage当我将数据库导入到主机(phpmyadmin)时

when I import my database to my host (phpmyadmin) I get this error message

当我将数据库导入到主机(phpmyadmin)时,我得到了这个错误消息。

CREATE DATABASE IF NOT EXISTS  `database name` 
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

any ideas?

什么好主意吗?

thanks

谢谢

2 个解决方案

#1


2  

Looks like the user cpses_coIKrnWBYz'@'localhost doesn't have access to the database connorma_database this may happen because you make the database from the root account and then you try to import the database with the logging of the user cpses_coIKrnWBYz'@'localhost to solve this use following steps

看起来用户cpses_coIKrnWBYz'@'localhost没有访问数据库connorma_database的权限,这可能会发生,因为您从根帐户创建数据库,然后尝试使用用户cpses_coIKrnWBYz'@' host的日志来导入数据库,以解决以下步骤

  • Log in to phpmyadimn as the root user
  • 作为根用户登录到phpmyadimn
  • select the databse connorma_database
  • 选择数据库connorma_database
  • go to the privileges tab
  • 转到privileges选项卡
  • add the user cpses_coIKrnWBYz'@'localhost with necessary privileges
  • 添加具有必要特权的用户cpses_coIKrnWBYz'@'localhost

#2


0  

My host did not create a database for me to add my tables.

我的主机没有为我创建一个数据库来添加我的表。


推荐阅读
author-avatar
Gbom2402851125
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有