[英]mysqli connection - How to create username and password? windows server 2008
I am trying to incorporate mysql with a mobile app. 我正在尝试将mysql与移动应用程序合并。
I just added the mySQLi php extension to my windows server 2008, but cannot figure out how to connect with the php code: $this->db = new mysqli('localhost', 'admin', 'XXXXX', 'admin_mySQL'); 我刚刚在Windows Server 2008中添加了mySQLi php扩展名,但无法弄清楚如何与php代码连接:$ this-> db = new mysqli('localhost','admin','XXXXX','admin_mySQL') ; This code is on a php file which is hosted on my server.
此代码位于托管在我的服务器上的php文件中。
I receive this feedback when I try to log in using the username and password I use to connect to the server through remote desktop: Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'admin'@'localhost' (using password: YES) 当我尝试使用通过远程桌面连接到服务器的用户名和密码登录时,收到以下反馈:警告:mysqli :: mysqli()[mysqli.mysqli]:(28000/1045):用户的访问被拒绝'admin'@'localhost'(使用密码:是)
I receive this feedback when I try to log in using the username and password I have set up for database access in Plesk Panel: Invalid request 当我尝试使用为Plesk Panel中的数据库访问设置的用户名和密码登录时,收到以下反馈:无效的请求
I am not sure if the problem is my user name and password or if I have set up something wrong or have the wrong settings on my server. 我不确定问题出在我的用户名和密码,还是服务器设置有误或设置有误。 What can I do to check the problem and correct it?
我该怎么做才能检查并纠正问题?
Thanks 谢谢
If you work with plesk, the first thing to ask is, have you created a user and database in the database control panel of your Plesk? 如果使用plesk,首先要问的是,是否在Plesk的数据库控制面板中创建了用户和数据库?
When you select a domain, you have a bunch of icons, in there you have "databases". 当选择一个域时,您会看到一堆图标,其中有“数据库”。 Inside databases, you can create users at first if i'm not wrong, and then you create the databases, not sure tho, i haven't work with Horriplesk in a while ;)
在数据库内部,如果我没有记错的话,您可以先创建用户,然后再创建数据库,请确保我有一段时间没有使用Horriplesk了;)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.