• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • Last Modified:

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)
1 Solution
MySQL user privileges can be defined so, that the same user has different privileges depending from IP address where you connect from. And very often ISP's allow to connect only from localhost (for security reason).
So, to access database from remote host you have to talk to administrator and ask him to allow such connection for your IP
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?
php_ladyAuthor Commented:
hello andrief

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

how can I use PHP to do so ?????
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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
php_ladyAuthor Commented:
I uploaded the script of the ls command

But : nothing happend at all :(
php_ladyAuthor Commented:
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
as I understand your old database has phpmyadmin.
so just create a new user with it:

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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now