FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » Database discussions » database dump and phpmyadmin..
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
database dump and phpmyadmin.. [message #2775] Fri, 24 May 2002 13:43 Go to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Hi,
There are times when using phpmyadmin is not that wise...Today I inserted a database dump with just a size about 1,9megs, not that terrific actually. Using phpmyadmin the following happened: It kept on loading endlessly... the command "top" revealed that httpd was eating an average of 90-97% Cpu time. Even after 15 minutes nothing else happened but the hourglass turning in Mozilla Wink I finally killed the process in order to avoid crashing the server. Just typing:
$ mysql database -u uraccount -p < urdump.sql
did the job in a few seconds. This way u will get a password prompt, but it has the advantage of not showing the password. I think the critical mass for phpmyadmin to handle is about 600-800k. anything beyond may still work, but it will take endless minutes to complete. I tested it with the following equipment:
Apache 1.3.24, PHP 4.2.1, MySQL 3.23.49a and phpmyadmin 2.26 (most recent version). So use the command line whenever it may be reasonable, saves time, money and unpleasant emails from BOFHs Wink
--edit: oops flipped "2" and "3" in MySQL Smile. corrected.
bye Ken

[Updated on: Fri, 24 May 2002 19:32]

Report message to a moderator

Re: database dump and phpmyadmin.. [message #2776 is a reply to message #2775] Fri, 24 May 2002 22:45 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Using PHP to import data in to MySQL will always be slower then just dumping it. However, in 10 minutes the forum's importer does about 400,000 MySQL inserts into tables with pretty big indexes, that is 80 megs of SQL data.

So, I'd say that phpmyadmin is just not very good code when it comes to speed.


FUDforum Core Developer
Re: database dump and phpmyadmin.. [message #2778 is a reply to message #2776] Sat, 25 May 2002 07:42 Go to previous messageGo to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
No Message Body

[Updated on: Sat, 25 May 2002 07:44]

Report message to a moderator

Re: database dump and phpmyadmin.. [message #2789 is a reply to message #2778] Sat, 25 May 2002 18:01 Go to previous messageGo to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
K, now finally my reply to that Wink Ur figures and my recent experience drastically show that it's still a long way to go for phpmyadmin until it will become really useful for larger databases. I think u and hackie should help them speeding things up Grin Actually I wonder what someone would be supposed to do when his/her/its old database was screwed up and he/she/it couldn't transmit the backup file because the host is running safe mode and there's no shell access included in the cheap hosting offer... I presume he/she/it wouldn't be too amused then Wink
bye Ken
Re: database dump and phpmyadmin.. [message #2790 is a reply to message #2789] Sat, 25 May 2002 18:41 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Ken Kizaki wrote on Sat, 25 May 2002 6:01 PM

K, now finally my reply to that Wink Ur figures and my recent experience drastically show that it's still a long way to go for phpmyadmin until it will become really useful for larger databases. I think u and hackie should help them speeding things up Grin Actually I wonder what someone would be supposed to do when his/her/its old database was screwed up and he/she/it couldn't transmit the backup file because the host is running safe mode and there's no shell access included in the cheap hosting offer... I presume he/she/it wouldn't be too amused then Wink
bye Ken


Uhm how would safe_mode prevent a person from uploading the backup file? Safe mode is stupid, and can be easily bypassed so I do not see that as a problem.

I have never used phpmyadmin because I think it is crap, why do you need when you have direct mysql access hehe Smile
I know many people use n'all that, but honestly I do not believe it is really that usefull... with 10 lines of PHP code the phpmyadmin can be easily replaced...


FUDforum Core Developer
Re: database dump and phpmyadmin.. [message #2792 is a reply to message #2790] Sat, 25 May 2002 19:35 Go to previous messageGo to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Well, safe mode disables setting of the time limit, thus it would limit the execution time to a max of 30 secs by default. That's why u would never get ur data uploaded to the server using phpmyadmin Smile But talking directly to mysql is of course more practical when it's just some simple stuff. I know about this "critical" mass problem for a while but I never tried with data bigger then 800k so I was interested how the latest phpmyadmin would handle such a situation. 15 minutes happy cycling wasn't exactly what I had expected before Wink.
bye
Ken
Re: database dump and phpmyadmin.. [message #2793 is a reply to message #2792] Sat, 25 May 2002 20:26 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Ken Kizaki wrote on Sat, 25 May 2002 7:35 PM

Well, safe mode disables setting of the time limit, thus it would limit the execution time to a max of 30 secs by default. That's why u would never get ur data uploaded to the server using phpmyadmin Smile But talking directly to mysql is of course more practical when it's just some simple stuff. I know about this "critical" mass problem for a while but I never tried with data bigger then 800k so I was interested how the latest phpmyadmin would handle such a situation. 15 minutes happy cycling wasn't exactly what I had expected before Wink.
bye
Ken


PHP execution time counter is a rather intersting thing, it does not always trigger and I think file upload would go through safely, since the uploading time does not get counted.


FUDforum Core Developer
Re: database dump and phpmyadmin.. [message #2794 is a reply to message #2793] Sat, 25 May 2002 20:56 Go to previous messageGo to next message
Olliver   Germany
Messages: 443
Registered: March 2002
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Unfortunately it doesn't at www.rokopsecurity.de. I know it because I already enjoyed this nice "maximum execution time exceeded" screen when inserting a dump via phpmyadmin. I don't know whether it's always the case with safe mode, because usually I have to deal with pages who turned this crap off (except that one) but there it does ignore the setting of the time limit. BTW: Hows the petition against the safe-mode of php doing? Wink
bye Ken
Re: database dump and phpmyadmin.. [message #2795 is a reply to message #2794] Sat, 25 May 2002 23:03 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Ken Kizaki wrote on Sat, 25 May 2002 8:56 PM

Unfortunately it doesn't at www.rokopsecurity.de. I know it because I already enjoyed this nice "maximum execution time exceeded" screen when inserting a dump via phpmyadmin. I don't know whether it's always the case with safe mode, because usually I have to deal with pages who turned this crap off (except that one) but there it does ignore the setting of the time limit. BTW: Hows the petition against the safe-mode of php doing? Wink
bye Ken


You can 'fix' this by adding set_time_limit(6000); this solves the problem rather easily. Unless of course a 'security minded' admin has disabled this option. In which case you can so ini_set('max_execution_time', 6000);

PHP safe_mode was has gotten to the point that developers agree this should not be in PHP 5. Since by that time PHP support Apache 2 will mature and Apache 2 will become mainstream. Since Apache's mpm allows each vhost to be run as the user who owns the vhost the security would be done by the web server using the file system permissions.

As for bugs in safe_mode, a number of them well fix, however there are few that were reported by me that are still open because there is no easy fix. Developers promised to fix them by PHP 4.3.0 heh...

I suspect there are more bugs, but I already done my share of safe_mode bug hunting and at least partially achieved my goal of educating people about how silly it is and hopefuly get the developers to drop this idiotic 'feature' in PHP 5.


FUDforum Core Developer
Re: database dump and phpmyadmin.. [message #186728 is a reply to message #2795] Mon, 19 January 2015 20:22 Go to previous message
jsam is currently offline  jsam
Messages: 2
Registered: January 2015
Location: hyd
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
By using shell also we can import the db in to mysql
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: slave database mysql
Next Topic: fud26_ses
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Dec 11 00:56:54 EST 2017

Total time taken to generate the page: 0.00824 seconds