[Gambas-user] Packaging a database application
Rob
sourceforge-raindog2 at ...94...
Fri Sep 10 18:38:24 CEST 2004
On Friday 10 September 2004 12:19, francesco.difusco at ...69...
wrote:
> I am developing a little Gambas program that uses a table of a
> mysql database. Now, if I ould like to distribute this
> program, how do I distribute the database in the RPM package?
Use mysqldump on the database; it generates a create script
containing SQL statements you can pass to mysql to recreate the
database and insert whatever data you have. There are some
options you should look into for mysqldump such as
"--add-drop-table" or something like that, in case the user
already has the database set up.
> Or, how do I install the database by program? What user,
> permission and password do I set? I never have done something
You need to prompt the user for a database user and password with
all permissions (well, database create, table create, and insert
at very least, plus grant permission if you're trying to set up
permissions on your database.) I don't think there's any other
way to do it short of dropping files in /var/lib/mysql (if you
can even assume that's the mysql data directory.) I think
Mandrake ships with mysql set up for unlimited access with no
password from the local machine, but I don't think you can
safely assume everyone does that.
Rob
More information about the User
mailing list