?
Solved

connecting to e remote MySQL server ?

Posted on 2002-03-21
11
Medium Priority
?
231 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 800 total points
ID: 6888010
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
ID: 6888013
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
ID: 6890464
hello andrief


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

how can I use PHP to do so ?????
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Expert Comment

by:andreif
ID: 6890766
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
ID: 6890796
I uploaded the script of the ls command

But : nothing happend at all :(
0
 

Author Comment

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

Expert Comment

by:andreif
ID: 6892011
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
ID: 6892405
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
ID: 6894524
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
ID: 6894746
I don't think that grant privileges are given to user. Admins don't like doing this
0
 

Expert Comment

by:annadatabhaskarsubramanyam
ID: 6901686
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses
Course of the Month16 days, 1 hour left to enroll

850 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