' Db_type ' = ' mysql ', //database type ' db_host ' + ' localhost ',//server address ' db_name ' = ' test ', // Database name ' Db_user ' + ' root ',// user name ' db_pwd ' = ' 123456 ', //password ' db_port ' = + 3306, // Port ' db_prefix ' = ' think_ ', //database table prefix ' db_suffix ' + ' , //database table suffix ' db_fieldtype_ Check ' = = False,// whether field type checking ' db_fields_cache ' = ' = '/ /enable field cache ' Db_ CHARSET ' + ' UTF8 ', //Database encoding defaults to UTF8 ' db_deploy_type ' + 0,//Database deployment method: 0 Centralized (single server), 1 distributed (Master-slave server) ' Db_rw_separate ' and False, //database read/write separate master-slave valid
The password is right.
How to Prompt
The system has an error
You can choose [Retry] [back] or [go home]
[Error message]
Access denied for user ' root ' @ ' localhost ' (using Password:no)
Reply to discussion (solution)
The hint says the password is wrong, you say the password is wrong, but everybody who knows is your password wrong right?
Look here
http://topic.csdn.net/u/20111208/23/dacbb0fb-9cfc-4a5a-8377-3ad0d89d0a95.html?71662
User name, password is wrong?
User name, password is wrong?
if (mysql_connect ("localhost", "root", "123456")) {
echo "Success";
} can show success.
The hint says the password is wrong, you say the password is wrong, but everybody who knows is your password wrong right? if (mysql_connect ("localhost", "root", "123456")) {
echo "Success";
} can show success.
But Access denied for user ' root ' @ ' localhost ' (using Password:no)
I mean, there's no password for the connection.
But Access denied for user ' root ' @ ' localhost ' (using Password:no)
Is that there is no solution to the password given when connecting.
It's easy, you'll know when you test it.
Known
mysql_connect ("localhost", "root", "123456")
Can connect successfully
So
mysql_connect ("localhost", "root", "12345"); Note that I intentionally removed the last 6 of the password.
Error Access denied for user ' root ' @ ' localhost ' (using Password:yes)
mysql_connect ("localhost", "root"); Do not give a password
Error Access denied for user ' root ' @ ' localhost ' (using Password:no)
The problem is solved.
The configuration file is wrong-written.
Solved, but do not know why, the main configuration file config.php inside has
$config = Require './config.inc.php '; Config.inc.php inside is the common database configuration information
I deleted the config.inc.php to write the information directly in the main configuration file is actually OK ....