MySQL 不显示在 phpMyAdmin 中创建的数据库 [英] MySQL not showing databases created in phpMyAdmin

查看:156
本文介绍了MySQL 不显示在 phpMyAdmin 中创建的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 phpmyadmin 中为我的服务器构建一个数据库,但是当我完成构建它时,我无法使用 PHP 访问它,并且当我在 MySQL 中列出数据库时它不会显示.但是当我在 mySql 中创建一个数据库时,它会显示在 phpmyadmin 中.此外,我正在运行 phpmyadmin 4.0.3 版,页面底部有一条声明说 phpMyAdmin 配置存储未完全配置,一些扩展功能已停用.要找出原因,请单击此处.

I'm trying to build a database for my server in phpmyadmin but when I finish building it I can't access it using PHP and it won't show when I list the databases in MySQL. But when I create a database in mySql it shows up in phpmyadmin. Also I'm running phpmyadmin version 4.0.3, and theres a statement at the bottom of the page saying The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click here.

谢谢!

推荐答案

这听起来像是权限问题.我猜你的 phpMyAdmin 正在以 root 身份(或具有超级用户权限的另一个用户)连接到 MySQL,因此可以看到所有数据库.您的应用可能使用其他权限较低的用户进行连接.

This sounds like a permissions issue. I'd guess that your phpMyAdmin is connecting to MySQL as root (or another user with the superuser privilege) and can therefore see all databases. Your app is probably connected using a different, lower privileged user.

尝试从您的应用程序和 phpMyAdmin 中运行 select user(); ,您就会确定.

Try running select user(); from your app and from phpMyAdmin and you will know for sure.

假设您的应用由不同的用户运行,您将需要为其添加权限以访问您创建的数据库.请阅读 phpMyAdmin 中标题为为特定数据库的用户分配权限的部分文档.

Assuming your app is running with a different user, you will need to add privilages for it to access the database you create. Please read the section titled Assigning privileges to user for a specific database in the phpMyAdmin documentation.

这篇关于MySQL 不显示在 phpMyAdmin 中创建的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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