Solved

connecting to e remote MySQL server ?

Posted on 2002-03-21
11
181 Views
Last Modified: 2006-11-17
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)
0
Comment
Question by:php_lady
11 Comments
 
LVL 6

Accepted Solution

by:
andreif earned 200 total points
Comment Utility
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
0
 
LVL 6

Expert Comment

by:andreif
Comment Utility
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?
0
 

Author Comment

by:php_lady
Comment Utility
hello andrief


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

how can I use PHP to do so ?????
0
 
LVL 6

Expert Comment

by:andreif
Comment Utility
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
     
0
 

Author Comment

by:php_lady
Comment Utility
I uploaded the script of the ls command

But : nothing happend at all :(
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:php_lady
Comment Utility
I can't connect to the new server either :( (remote connect)
0
 
LVL 6

Expert Comment

by:andreif
Comment Utility
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 :)
0
 
LVL 6

Expert Comment

by:andreif
Comment Utility
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/
0
 
LVL 8

Expert Comment

by:us111
Comment Utility
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;
0
 
LVL 6

Expert Comment

by:andreif
Comment Utility
I don't think that grant privileges are given to user. Admins don't like doing this
0
 

Expert Comment

by:annadatabhaskarsubramanyam
Comment Utility
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.

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now