Page 1 of 1

How to upload data?

Posted: Sun Dec 01, 2002 11:49 pm
by einnox
:roll: This is just an idiot question.. How can i upload data to mySQL tables using FTP?

thanks :(

Posted: Sun Dec 01, 2002 11:56 pm
by volka
Do you want to a) replace files* or to b) add records?
a) they are normal files that can be transfered in binary mode. Shut down mySQLd while uploading the files.
b) afaik there is no direct access to mySQL via FTP, but you might upload a sql-batch-file and execute it in a server's shell.
http://www.mysql.com/doc/en/mysql.html
http://www.mysql.com/doc/en/mysqlimport.html
http://www.mysql.com/doc/en/mysqldump.html
if you have no shell access at the server but can access the database from the internet you can use the mysql-client at your local box to connect to the server and run the batch-file
mysql -hserveraddress -udb_username -ppassword < local-sql-file


*replacing the mysql-files will at least change a whole table

How to upload data?

Posted: Mon Dec 02, 2002 6:56 pm
by einnox
all i do is to get or aquired an access to the mySQL server? :oops:

Posted: Mon Dec 02, 2002 11:48 pm
by volka
I assume you have an account with php/mysql somewhere?
Most provider (I'm aware of) block direct connections to their mysql-server from outside. But often there is a webtool installed (e.g. myphpadmin) that offers an import feature of some kind. Maybe you should check this first.
If it is not already installed you might do so for your account

How to upload data?

Posted: Tue Dec 03, 2002 1:58 am
by einnox
yes i already seen that tool by tobias.. i also buy his book (php). Anyway, i'll just ask the webhost for the access. Do a client mysql can connect remotely to the webhost?

regards

Posted: Tue Dec 03, 2002 5:28 am
by volka
as long as the tcp-port is not blocked