Archive for March, 2007

I want to be able to play around with mysql and php webpages. So I want to create/use a database as a new user.

mysql -u root -p
mysql> create web_events;

This creates a new database called web_events. Now I want a particular user to be able to do anything to it.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
| web_events         |
+--------------------+
4 rows in set (0.00 sec)

mysql> grant all on web_events.* to user1@localhost identified by "secret";

mysql> select Host,User,Password from user;
+-----------+-------+------------------+
| Host      | User  | Password         |
+-----------+-------+------------------+
| localhost | root  | 1e3392c069a69a58 |
| localhost | user1 | 66d28a553dc2d3a7 |
+-----------+-------+------------------+
2 rows in set (0.00 sec)

Now I can log in as user1 and see the databases available.

hep:~: mysql -u user1 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19 to server version: 5.0.18

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
| web_events |
+--------------------+
3 rows in set (0.00 sec)

If a website, does not have an index.html (or index.php or whatever is specified as the DirectoryIndex in httpd.conf), then a browser will show a file not found error when browsing that directory. To instead show a list of all files in the directory, add “Indexes” to the Options of the Directory in httpd.conf.

Cern Scientific Linux:
apt-get update
apt-get upgrade

Fermi Scientific Linux:
yum update

Our ntp settings got screwed up (though it’s more accurate to say that I screwed up our ntp settings.) To determine what the current settings are:

$ ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+ns1.uchicago.ed darkcity.cerias  2 u    4   64  377    3.372   -2.833   1.466
*ns4.uchicago.ed tick.uh.edu      2 u  123  128  377    0.389   -4.102   0.163
+ns5.uchicago.ed tick.uh.edu      2 u    -   64  377    0.459   -4.140   0.082

Note that if above it shows 0.0.0.0 as the refid, the system is NOT communicating with the ntp server.