php - Unable to connect to database
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-16 13:08:30
0
3
285


求教……

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(3)
给我你的怀抱

1. Warning, cannot access, check if your mysql account password is wrong
2. Error, mysql_error has been abandoned, this mainly depends on your PHP version, PHP 7 has been abandoned

仅有的幸福

Your code is wrong, it should be mysqli_connect($dbHost, $dbUser, $dbPwd). Your second parameter is $dbName.

In addition, mysql_error has been deprecated, use mysqli_error instead.

Ty80

A few suggestions:
1.mysql_error has been abandoned. Do not use it. You can use PDO or mysqli.
2. Is the database open?
3. Is the database name written correctly?
4. Is the database account password incorrect?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template