Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL statement that returns a SQL statement?

Tags:

php

mysql

export

I need to do a dump of a table on a remote server, but I can't access the server directly. The only access I have is through PHP scripts.

Is there some way in which MySQL will return an

INSERT INTO `table_name` (`field1`, `field2`) VALUES ('a', 'b'), ('c', 'd')

statement, like what mysqldump will return?

I don't have access to phpMyAdmin, and I preferably don't want to use exec, system or passthru.

See this question for another export method

like image 491
Jrgns Avatar asked Sep 15 '08 14:09

Jrgns


Video Answer


1 Answers

1) can you run mysqldump from exec or passthru
2) take a look at this: http://www.php-mysql-tutorial.com/perform-mysql-backup-php.php

like image 174
UnkwnTech Avatar answered Oct 26 '22 11:10

UnkwnTech