MySQL will be useful for multiuser stuff such as Ideator, and the experimental browser adventure game thingummy. And perhaps newer versions of mwuki, or something. (I may keep Mwuki single-user and SQLite-based)
See MySQL and PHP on Dreamhost wiki.
Pages from the MySQL docs
I should also add pages from the referencey section that covers syntax etc of things like show commands, select, and various create table options, etc etc. That stuff is probably going to be the stuff I need to refer to most often I think.
Other interesting pages, esp for locking
TODO: Some of this should be copied to/referenced on the page about locking and tempfiles.- Last Insert ID() function, handy for getting unique IDs?
- LOCK TABLES command, an alternative mechanism to transactions.
- Get Lock() function, handy perhaps for synchronising access to resources outside of the DB? Not sure if this is safe though, as the resources may perhaps have asynchronous access or whatever it is I mean. Like you could get a lock via the DB, and then try to access the filesystem via NFS, but there could be NFS stuff still going across the network from before you got the lock, so it might be out of synch???? HOWEVER, if all the calls are from the same host (eg the webhost), then I'm guessing they shoudl see the filesystem much more in-synch than if the calls were from distributed hosts. Where another host (eg the shell host using a cron job) has to access the same resource, it should ideally hold the lock for a few moments before using the filesystem (read or write), and then a few moments more after finishing writes, before it releases the lock again. If there's only one lock for the resource (rather than a resource pool with each item having its own lock), this will probably be very troublesome to do as it would block all the other requests completely. But really the resource pool approach should be used if possible anyway. Other resources such as devices (not applicable to webserving of course!) would not tend to be amenable to the resource pool approach, but OTOH they probably wouldn't have the same synchronisation issues as NFS anyway.
- LOAD DATA commands. Nothing to do with locking really, but handy to know. NB there are two types of LOAD DATA; if you don't specify LOCAL, it will try to use files on the DB server, which will almost certainly fail. Note also there was some change to the system a few years ago to deal with possible security issues, that apparently broke/messed up things for a fair few people, it may cause difficulties still for all I know.
See also SQLite,or return to Main Page