创设了两个Mysql数据库,php里却只能连接到一个

WBOY
Release: 2016-06-13 10:38:20
Original
983 people have browsed it

创建了两个Mysql数据库,php里却只能连接到一个
我在本地服务器创建了两个数据库,test 和 bbs
使用的时候只有test 可以连接上,bbs 连接不了

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->function db_connect(){   $db = @new mysqli("127.0.0.1", "developer", "123456", "test");   if (!$db)      return false;   return $db;}
Copy after login

上边这个可以连接到,下边这个却不可以
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->function db_connect(){   $db = @new mysqli("127.0.0.1", "developer", "123456", "bbs");   if (!$db)      return false;   return $db;}
Copy after login



------解决方案--------------------
貌似是用户没权限。。
------解决方案--------------------
developer 用户没有操作 bbs 的权限,你应给给足权限。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template