Link to home
Start Free TrialLog in
Avatar of php_lady
php_lady

asked on

connecting to e remote MySQL server ?

Hello all ,

The whole story :
I have a VBulletin Forum on a sever ... The Forum Database is VERY large now .
My hosting company had some problems that let me lose my domain name :( ... and now I don't have Telnet access to my old site .
I can log in to the FTP and I can access my database from PHPMyAdmin .

I want to transfer the database to a new sever .
I did that before using mysqldump .
But the problem now is that tha database is huge so I can't transfer it to my PC the to the new server (I could't compress it because I no longer have a telnet acces , and no longer have access to my old Control Panel) .

I have an idea : I want to connect to my old server using PHP - MySQL and then I can use The Forums Control Panel a make a back-up of the database as a file.sql
then I can solve the problem .

BUT : I couldn't connect to the remote server . I get the folloing error :
Host 'my.new.IP' is not allowed to connect to this MySQL server .

Any one can help ? :( (200 points)
ASKER CERTIFIED SOLUTION
Avatar of andreif
andreif
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way, can you upload your php scripts to the old server? May be you'll able to run script there? Or, at least, make dump there and compress it (using php scripts), and then download it?
Avatar of php_lady
php_lady

ASKER

hello andrief


Yes .... Ican upload files there >>>

how can I use PHP to do so ?????
1. Can you connect to your new server if you run PHP script on the old?

2. Check, is it possible to call programms from PHP script (at your old server).

Try this code:
$fp = popen ("ls", "r");
$contents = fread ($fp, filesize ($filename));
pclose ($fp);
print "$contents";

it must run "ls" command at your server. If it works, you can run "mysqldump" to make dump and then "tar" to compress it
     
I uploaded the script of the ls command

But : nothing happend at all :(
I can't connect to the new server either :( (remote connect)
Okay, but how large is your database?
Does phpMyAdmin make dump from it, or it produce an error?
What about making dump with phpMyAdmin, if you call it not from your PC, but from new server (using PHP or shell), so, transfer will done from server to server, do you think it's possible? (I worry about database size :)
Hi php_lady,

I've jsut installed new version of phpMyAdmin and discovered that there is an opportunity to download zip'ed or even gzip'ed dump of database! I think, it can solve your problems.

All you need is to install fresh phpMyAdmin to your account
http://phpwizard.net/projects/phpMyAdmin/
as I understand your old database has phpmyadmin.
so just create a new user with it:

GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX ON your_database.* TO your_user@your_ip IDENTIFIED BY 'your_password';
FLUSH PRIVILEGES;
I don't think that grant privileges are given to user. Admins don't like doing this
Just out of concern for the PHP_Lady

Did u talk to the old hosting company. Wont' they help you out? I guess that is the best way out.