Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

connecting to e remote MySQL server ?

Posted on 2002-03-21
11
Medium Priority
?
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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…
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

618 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