Otto Leholt (le****@worldonline.dk) wrote:
: Hi
: I have made several website using MS Access and asp. Now I need to upgrade
: from Accesss to MYSQL -
: I got my website working with MYSQL on my local PC - but now the problem is
: how I get it working on my webhost . I have the right connecting string (
: according to webhotels supporter) but how do I transfer my SQL database from
: local pc to server..?? With MS Access it was very straight forward - I just
: uploaded my .MDB file to my DB folder om the server.
: How does this work with MYSQL - on the local pc my tables are stored in
: C:\mysql\data\test
: What I did was - uploading the folder 'test' (including the tables .FRM
: files ) to my BD folder on the webserver . But I cant make it work - There
: is no database called 'test' showed at the webhotel ...
: Please someone - give me a clue ....
I have always used the mysql admin tool to create the database, and then
re-run my scripts that create the various tables, and also the scripts
that define the grants required.
I do that using a small special purpose cgi script written in ksh, bash,
or whatever, that calls the mysqladmin and mysql programs directly.
#!/bin/sh
echo "Content-type: text/plain
"
mysqladmin create test
mysql < create-tables.sql
mysql < grant-grants.sql
mysql < insert-initial-data.sql
The above doesn't show the login details that mysql requires, so it isn't
100% what you need, but it's easy to test from your command line ahead of
time to get it all correct. (And of course you need to create the scripts
that do the creates and grants etc, and put them in an accessible
location.) Also, you may need to use the full paths to the mysql
programs, they may not be in the path.
Remove the script afterwards so no-one else can run it later.
Or use the phpmysqladmin (?) tool - that name is probably wrong, but a few
searches should turn up the program I am thinking about. That tools allow
you to administer mysql via a web interface, and if the host has mysql
they may already have that tool available for you to use.
--
This space not for rent.