I can connect to the data through the xshell terminal:
But when I try to connect to the database online through a php (www.discountfollow.com/a.php) test file under the official domain name, the prompt:
the database is error: Access denied for user 'root'@'www.discountfollow.com' (using password: YES)
What is the reason for this problem? Thanks. . .
I can connect to the data through the xshell terminal:
But when I try to connect to the database online through a php (www.discountfollow.com/a.php) test file under the official domain name, the prompt:
the database is error: Access denied for user 'root'@'www.discountfollow.com' (using password: YES)
What is the reason for this problem? Thanks. . .
I once encountered a pitfall that database users can only monitor on 127.0.0.1
, but not on localhost
Create a new database,
<code>CREATE DATABASE testdb; </code>
You create a new database ordinary user,
<code>CREATE USER 'dba'@'127.0.0.1' IDENTIFIED BY '123456'; </code>
Authorization,
<code>Grant select, insert, update, delete on testdb.* to dba@'127.0.0.1' ; </code>
Then use dba
user to connect testdb
database on 127.0.0.1
If the connection cannot be made, what is the error message? Debug based on error information, such as wrong address or wrong password. Port error etc.