]> andersk Git - sql-web.git/blob - tpl/index.php
Don't advertise /do/signup; it doesn't write a my.cnf
[sql-web.git] / tpl / index.php
1 <?php
2 include 'head.php';
3 ?>
4
5 <p>
6 This service provides <a target="_blank" href="http://dev.mysql.com/doc">MySQL</a> databases to <a target="_blank" href="http://ca.mit.edu/">MIT certificate</a> holders.
7 You must choose a MySQL password (which should be different from your Athena account password) when you <a href="http://scripts.mit.edu/faq/27">sign up</a>, and
8 then use this interface to create and drop databases.  All subsequent SQL commands can be issued from any host, client, and/or script of your choice;
9 simply connect to the MySQL server at <b>sql.mit.edu</b> using your username and your new MySQL password.
10 You may find it convenient to run scripts using the <a target="_blank" href="http://scripts.mit.edu/web">web script service</a> or
11 <a target="_blank" href="http://scripts.mit.edu/cron">shortjobs service</a>.
12 </p>
13
14 <p>
15 All uses of this service must comply with the <a target="_blank" href="http://web.mit.edu/olh/Welcome/rules.html">MITnet rules of use</a>.
16 </p>
17
18 <p>
19 This service has been designed with reliability in mind; we utilize RAID, live server mirroring and periodic offline backups to ensure data reliability.
20 However, the SIPB MySQL service should not be used to host critical applications that cannot tolerate downtime.
21 One nightly backup is available for your locker at <code>/mit/sql/backup/LOCKER_NAME</code>.  You should perform additional backups of your data using the <a href="http://scripts.mit.edu/cron">shortjobs service</a> or <a href="http://scripts.mit.edu/faq/10/how-can-i-back-up-or-restore-my-sql-data">phpMyAdmin</a>.
22 </p>
23
24 <div style="text-align:center; font-style: italic;">
25 <?php
26 if (file_exists('/afs/athena.mit.edu/contrib/sql/stat/questions')) {
27         $x = file_get_contents('/afs/athena.mit.edu/contrib/sql/stat/questions');
28         list($t, $v) = explode("\n", $x);
29         $qavg = $v/$t;
30         $qunits = array('','k','M','G','T','P','E','Z','Y');
31         while (count($qunits) && $v/1000>1) {
32                 array_shift($qunits);
33                 $v /= 1000;
34         }
35         printf('sql.mit.edu has served %.3f%s queries', $v, array_shift($qunits));
36         $qunits = array('minutes', 'hours', 'days');
37         $qdiv = array(60, 60, 24);
38         while (count($qdiv) && $t/$qdiv[0]>0) {
39                 $t /= array_shift($qdiv);
40                 $tunits = array_shift($qunits);
41         }
42         printf(' in the last %.2f %s (%.2f qps)', $t, $tunits, $qavg);
43 }
44 ?>
45 </div>
46
47 <?php
48 include 'foot.php';
49 ?>
This page took 0.033095 seconds and 5 git commands to generate.