tailieunhanh - Mysql your visual blueprint for creating open source databases- P13

Mysql your visual blueprint for creating open source databases- P13:The show tables command displays a list of tables available in the currently selected database. You can use this command when you are unsure of the exact name of a table within the database. | 12 USING MYSQL WITH PHP When you select the Users option the user table in the mysql database is opened and the list of current users is displayed. The Edit link next to each username allows you to change the user s hostname and assign privileges. The Delete link deletes a user. The Grants link displays the current list of privileges granted to a user and allows you to delete or modify the privileges. The Users page also includes a form that allows you to create a new user. You can specify the hostname the user is allowed to connect from a password and the privileges the user should be assigned for a particular database. You can also open the mysql database directly in phpMyAdmin to work with the various security tables. Keep in mind that this feature is potentially dangerous if you mistakenly delete the root user for example you can lose access to the server. See Chapter 11 for more information about managing MySQL security. For details on using phpMyAdmin to manage a MySQL server see the official documentation. The complete phpMyAdmin documentation is usually installed when you set up this utility. To access your local copy of the documentation follow the phpMyAdmin documentation link on the main page. L- The System variables and their values are displayed. 0 Click the Home link to return to the main phpMyAdmin page. L- The MySQL server s current process list is displayed. H Click the Home link to return to the main phpMyAdmin page. 0 Click the Show processes link. 227 MySQL CONNECT TO A MYSQL SERVER Before you can use any MySQL functions in PHP you must first open a connection to the MySQL server. You can do this using the mysql_connect function. To use this function specify a hostname username and password for the MySQL server link mysql_connect localhost testuser testpw This command opens a connection to the MySQL server and returns a link identifier that can be used to perform operations on the server. In this example the identifier is stored in the link .