Forum archive 2000-2006

Lars Jensen - mysql webwork2 database

Lars Jensen - mysql webwork2 database

by Arnold Pizer -
Number of replies: 0
inactiveTopicmysql webwork2 database topic started 9/13/2004; 12:06:11 AM
last post 9/13/2004; 2:56:56 PM
userLars Jensen - mysql webwork2 database  blueArrow
9/13/2004; 12:06:11 AM (reads: 1326, responses: 5)
We're running all our webwork2 courses using gdbm. Next semester, I'd like to use all our courses to mysql. In preparation, I'd like to set up a test couese using mysql this semester. Thus, I browsed around the twiki site for info on how to set up the myswl webwork2 database, and found very little. database.conf did contain a little info. Is there any other place to look for instructions on how to set up the mysql database?

<| Post or View Comments |>


userZbigniew Fiedorowicz - Re: mysql webwork2 database  blueArrow
9/13/2004; 11:50:57 AM (reads: 1574, responses: 0)
Hi Lars,

Since you are already running Moodle, I presume you have PHP running on your server. Hence I would recommend that you install phpMyAdmin (the original version, not the Moodle customized version). It makes mysql administration a breeze.

Perhaps there might also be a Perl mysql administration tool with similar capabilities. Does anyone have a recommendation?

Zig

<| Post or View Comments |>


userBill Ziemer - Re: mysql webwork2 database  blueArrow
9/13/2004; 12:50:42 PM (reads: 1522, responses: 0)
I just used the mysql documentation, and found it very easy to follow, in particular:

http://dev.mysql.com/doc/mysql/en/Post-installation.html

for setting up a webwork mysql user.

<| Post or View Comments |>


userLars Jensen - Re: mysql webwork2 database  blueArrow
9/13/2004; 12:53:10 PM (reads: 1557, responses: 0)
Hi Zig,

Thanks for your response. I'm aware of phpmyadmin - it is a great tool.

So far, I have created a mysql database named WeBWorK, and two users, webworkRead and webworkWrite with privileges to the WeBWorK database as listed in database.conf. I have also edited the passwords I set up for these two users into database.conf. Do I have to create any tables in the WeBWorK database?

Next, I want to create an sql course. On the course setup screen, I have to list an "SQL Admin Username" and an "SQL Admin Password." What would these be? Is this referring to the webworkWrite user, or what?

Thanks, Lars.

<| Post or View Comments |>


userLars Jensen - Re: mysql webwork2 database  blueArrow
9/13/2004; 2:37:55 PM (reads: 1534, responses: 0)
Hi,

OK, when I used root and root password for "SQL Admin Username" and "SQL Admin Password" when setting up a course, the course was successfully created, and a new database with 8 tables was also created in mysql. I guess that the SQL Admin User must have global privileges to set up mysql webwork courses?

We have several other databases running on our system, and I don't like the idea that the webwork mysql admin user has privileges to see the other databases. Is there any way of preventing this?

If not, what are the minimum required privileges of the SQL Admin User?

Lars.

<| Post or View Comments |>


userSam Hathaway - Re: mysql webwork2 database  blueArrow
9/13/2004; 2:56:56 PM (reads: 1527, responses: 0)
In WeBWorK 2.0, SQL course databases (using the "sql" database layout) are each stored in their own SQL database. Therefore, the "SQL Admin User" needs to have permission to create and delete databases (FILE) and create and drop tables (CREATE, DROP), as well as the standard read/write permissions of SELECT, INSERT, UPDATE, and DELETE.

At Rochester, we typically use the "root" user as the "SQL Admin User", but there is no reason why one couldn't create a separate user, as long as it had the necessary privileges.

The upcoming WeBWorK 2.1 release will include support for a new database layout, "sql_single", which stores the data for all courses using that layout in a single database. This streamlines the course creation/deletion process (since one no longer has to create or delete a course database), makes database access more efficient, and reduces the level of access needed to create and delete SQL courses.

There will be a utility for converting courses from the "sql" layout to the "sql_single" layout.

You may want to take a look at the Database Layout Manual, which clarifies some of the terminology we've been tossing around.

<| Post or View Comments |>