There are five actions that can be taken to deal with MySQL database access on CCC UNIX systems:
All databases are homed on a MySQL server running on mysql.WPI.EDU. When creating a database, you select a database name and a managing user name. If creation is successful, a password will be issued for that user name. This user name and password are for use within the database only and do not correspond to your UNIX login and password.
For tracking purposes, the database is associated with your UNIX login, and your UNIX login is used for subsequent database change operations you might issue from this page, so that others cannot modify your database. Again, your UNIX login is not used to directly reference the database.
Please see the manual for help with MySQL
This self-service page is meant to support courses, projects, clubs, and personal experiments. It has run trouble-free for years in a self-regulating way. We did find a problem once where a student had stored large blobs (unstructured data) which caused a problem, so we recommend that if you have a large chunk of data to store that you store it on the file system and only store a pointer to the data in the database. That will provide faster response for your application and also will not clog the database. Thanks.
Create the database
Add a user to the database
Note: as of mysql 4.1.10, installed March 2005, the priv columns must be capital Y or N, so if you are dealing with db, table, or user privs, be sure to use upper case. Prior mysql versions didn't care about case.
Set a user's password
Remove a user from the database
Drop the database
Linking mysql client library to a c program
Compiling and linking against mysql should look like:
cc -I/usr/local/mysql-current/include your-program.c -L/usr/local/mysql-current/lib/mysql -lmysqlclient -ldlIn your program, you should include the mysql symbols:
#include <mysql/mysql.h>which will define the mysql API as documented at http://dev.mysql.com/doc in the chapter on APIs and Libraries
Last modified: Tuesday, 23-Nov-2010 15:25:40 EST root@wpi.edu