最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
Connect using mysql binary ¶
You can use MySQL binary to enter the mysql command prompt to connect to the MySQL database. The following is a simple example of connecting to a mysql server from the command line: After a successful login, a mysql > command prompt window appears, on which you can execute any SQL statement. After the above command is executed, the successful login output is as follows: In the above example, we use root users to log in to the mysql server, but you can also log in with other mysql users. If the user permissions are sufficient, any user can SQL from the command prompt window of mysql. You can use the exit command to exit the mysql > command prompt window, as follows:Example ¶
[root@host]# mysql -u root -p Enter password:******
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2854760 to server version: 5.0.9 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit Bye
Connect to MySQL using a PHP script ¶
PHP provides mysqli_connect() Function to connect to the database.
This function takes six parameters, returns the connection ID after a successful link to MySQL, and returns FALSE if it fails. 参数说明: Parameters. Description host Optional. Specify the hostname or IP address. username Optional. Specifies the MySQL user name. password Optional. Specify the MySQL password. dbname Optional. Specify the database to use by default. port Optional. Specifies the port number that attempts to connect to the MySQL server. socket Optional. Specifies the socket or named pipe to use. You can use PHP. Only one argument to this function is This function closes the non-persistent connection to the MySQL server associated with the specified connection identity. If not specified 提示: There is usually no need to use the You can try the following example to connect to your MySQL server: Connect MySQLGrammar ¶
mysqli_connect(host, username, password, dbname,port, socket);
mysqli_close() Function to break the link to the MySQL database. mysqli_connect() The MySQL connection identifier returned after the function successfully created the connection.Grammar ¶
bool mysqli_close ( mysqli $link )
link_identifier Closes the last open connection mysqli_close() Because open non-persistent connections are automatically closed after the script is executedExample ¶