r7 - 15 Jan 2010 - 12:40:19 - GisleHannemyrYou are here: TWiki >  Main Web  >  NemoServices > DataBases > MySQL

Getting Started with MySQL on Nemo

Every Nemo-project member can have one (1) MySQL database and one associated mysql account. I try to maintain a list of databases and their status, but it may not always be up to date.

If you for some reason you need to have more than one database or more than one MySQL ccount, you must present a good reason for this. The name of your database and associated mysql account will usually both be identical to your shell login id, but the password will be different. Note that if you use PHP or similar scripting languages, the password associated with your MySQL account will be embedded in various scripts in clear text, so do not reuse your shell password or any other high security password for this, and make sure that the script is not world readable (it only need to be readable by the www user, named "wwwrun"). If you don't have root privileges, you may not be able to chown this yourself. In that case, contact one of the Admins and inform about the file that need to be secured (in most cases, securing entail setting ownership of files with embedded passwords to wwwrun:user and mod for the same files to 660. Also, delete any config-directories left behind (e.g. MediaWiki config).

Setting up MySQL Applications

While you should only have a single database, you can use the database to set up as many MySQL-applications you like, by creating the appropriate tables needed by each application. The recommended practice to separate the tables belonging to different applications from each other is to differentiate the namespace by means of an application specific table name prefix.

For instance, if you use the MediaWiki software to create something called ObjectWiki, you assign this particular wiki the table name prefix ow01_ (so the table containing wiki text will be named ow01_text). If you later want to create an OsloWiki and make that a different MySQL application, you just select a different table name prefix, for instance ow02_.

This way of distinguishing different applications within the same database is fairly widespread, and most application software for databases (e.g. MediaWiki, WordPress) is ready for this and allows you to pick a suitable table name prefix as part of their setup routine.

-- GisleHannemyr - 07 Nov 2006

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback