Mysql remote connection Problems and Solutions
Problems with mysql remote connection,
1. The database is not running.
2. The remote access permission is not enabled, and the IP address restriction is not enabled.
Http://www.cnblogs.com/jerome-rong/archive/2013/03/05/2944264.html
This is the solution.
Refer:
Allow mysql remote connection in ubuntu
Start and restart the mysql Command
Hello, I have encountered the problem that mysql does not have a remote connection. Please help me
The key is to learn how to analyze and find the cause on your own ~
After your insert statement, remember to check whether the statement is successful. If the statement fails, the cause of the error is displayed. When you run the program, you can see the cause. Generally, the insertion fails, it may be a constraint, for example, the keyword segment is empty or repeated.
Typical detection methods are:
$ SQL = "insert ...";
If (mysql_query ($ SQL) echo "is inserted successfully. ";
Else echo "insertion failed, SQL statement: $ SQL, error cause:". mysql_error ();
Mysql remote connection problems
Re-authorize, root can only connect locally
In linux, the root user enters mysql,
Assume that your database is ABC, you can create a new user to join the efg, And the password is also efg, then you enter the following authorization command under the mysql operator to reconnect:
Grant all privileges on ABC. * to 'efg' @ '% 'identified by 'efg ';