Chapter 12 . Security 319 Figure 12-10: Adding (Best web hosting)

Chapter 12 . Security 319 Figure 12-10: Adding a user to the MySQL database server 6. Since you re creating Web pages with status information, the user doesn t need any extra privileges. The following command simply creates the user on the database server (but does not give the user privileges such as SELECT, INSERT, DELETE, or the like): GRANT USAGE ON dummydb.* to Webuser@localhost IDENTIFIED BY 34vh21z ; Note The FLUSH PRIVILEGES statement is not necessary when you re using the GRANT statement. Creating the script that makes the Web pages With the Web server and access method ready, you can create a script for producing the actual Web pages. The script itself can be a simple shell script (which Windows users know as a Windows script), or it can be done in another language such as Perl. The concept for the script is simple: Run the MySQL CLI command mysql in batch mode, use the -Hswitch to produce HTML output, and redirect that output to a file. Figures 12-11 and 12-12 show examples of simple scripts to check the status of the server via the SHOW STATUS statement and also to look at the processes running on the server via the SHOW PROCESSLIST statement. Figure 12-11 is a simple shell script; Figure 12-12 is a script written in Perl. Note You will probably need to change the paths to both the MySQL CLI and the directory in which you want to produce the HTML output from the script.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Leave a Reply