There is a server linux+apache+mysql+php another phpmyadmin installed
Use phpMyAdmin to access the server normally
But I wrote php myself.
Connecting the database says the target machine is actively rejecting. Unable to connect ....
$username = "Test"; $psword = "123456"; $hostname = "10.12.18.27"; $dbName = "TestDb"; $server _link = mysql_connect ("$hostname", "$username", "$psword")
This sentence will be a problem ...... Mother, there's no justice.
With root or test account, the phpMyAdmin can be logged in normally.
The only difference is that phpmyadmin on the server.
My PHP code is on my Computer (apache+php+win7)
Again test account, what remote login, arbitrary location login function all open ...
Reply to discussion (solution)
No permissions to open MySQL remote connection
No permissions to open MySQL remote connection
Do you mean user rights?
%
localhost
127.0.0.1
Host Name
These four full-on.
was normal before.
The server restarted.
That's it
You can use SQLyog or command line to connect to see. See if you can connect successfully.
You can use SQLyog or command line to connect to see. See if you can connect successfully.
Error code 2003
The host entry for the user table in the MySQL database, renamed% from localhost
Or a new add-on record, the host entry is your local IP address, and you authorize
Restart MySQL Service
Rules of Practice:
Using the GRANT command
You want MyUser to use MyPassword to connect to the MySQL server from any host.
GRANT all privileges on * * to ' myuser ' @ ' percent ' identified by ' MyPassword ' with GRANT OPTION;
If you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.3 and use MyPassword as the password
GRANT all privileges on * * to ' myuser ' @ ' 192.168.1.3 ' identified by ' MyPassword ' with GRANT OPTION;
The host entry for the user table in the MySQL database, renamed% from localhost
Or a new add-on record, the host entry is your local IP address, and you authorize
Restart MySQL Service
Rules of Practice:
Using the GRANT command
You want MyUser to use MyPassword to connect to the MySQL server from any host.
GRANT all privileges on *. * to ' Myu ...
I don't know why.
I delete the test account, and then create a new test, the permissions are identical.
%
localhost
127.0.0.1
Host Name
Reference 5 Floor Xuzuning's reply: The host entry for the user table in the MySQL database, from localhost to%
Or a new add-on record, the host entry is your local IP address, and you authorize
Restart MySQL Service
Rules of Practice:
Using the GRANT command
You want MyUser to use MyPassword to connect to the MySQL server from any host.
GRANT All Privi ...
It's OK to restart MySQL again.