初学PHP!请问
Jun 13, 2016 pm 01:42 PM
connect
localhost
mysql
php
quot
初学PHP!请教!
- PHP code
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->$con=mysql_connect("localhost","root","1234")or die("Á¬½Óʧ°Ü");
Copy after login
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in D:\www_local\bbs\conn.php on line 2
连接失败
只有这一句代码,就报这样的错误!!!
我用的是wamp5的集成开发包,在想是不是什么配置错了,但是修改了php.ini里面的相应配置,还是同样错误。。。。求大师指点下。。。
------解决方案--------------------
wampserver 自带的数据库改了密码,很麻烦的 config.inc.php 里要改,重启浏览器。
------解决方案--------------------
在mysql命令行登录下看看你的密码是否正确.
mysql -u root -p
------解决方案--------------------
如果通过命令行能进去,也就是密码什么的,是正确的,
再使用127.0.0.1连接,不要用localhost,万一没绑定localhost呢,呵呵
------解决方案--------------------
好像Wamp改了数据库的密码会很麻烦,所以还是用appserv 比较好……
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

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

How to fix mysql_native_password not loaded errors on MySQL 8.4
