problem with importing database into mysql.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
sarbas
Forum Commoner
Posts: 64
Joined: Thu Jan 04, 2007 5:51 am

problem with importing database into mysql.

Post by sarbas »

Hi every body ...
I'm beginner in using LAMPP,

I got the error while try to import a big SQL (184 MB) in to SQLMyAdmin ,
Fatal error: Maximum execution time of 300 seconds exceeded

I try to change the value of memory_limit = 184M and max_execution_time = 0 in Php.ini file and restart the lampp. But still got the problem,

Now using the option of partial import, its consuming more time .

And I try to import the database through terminal window.
while use this command I got error as mysql : command not found

mysql -u "username" root -p "password" < filename.sql

can any one help to overcome this .
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

You could break the 184M file into a number of smaller files and import each separately. Maybe use the split command.
(#10850)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

try this:
mysql -u "username" root -p "databasename" < filename.sql

It should then ask you for your password. Enter it, and let me know how it goes.
sarbas
Forum Commoner
Posts: 64
Joined: Thu Jan 04, 2007 5:51 am

error using the mysql command

Post by sarbas »

Thanks for your kind reply



I used the above command in terminal window as a root user.

mysql -u "username" root -p "databasename" < filename.sql

but I got the following error

[root@dhcppc0 ~]# mysql -u root -p askpert <askpert.sql
bash: mysql: command not found

My database is in a text file with the extension of .sql . and its a 184 MB, its in my desktop ..........
leewad
Forum Commoner
Posts: 91
Joined: Tue May 11, 2004 8:32 am

Post by leewad »

The problem should not lie with the size of the file, i have used one bigger than that before and used the following:

Code: Select all

mysql -h localhost  -u username -p databasename < filename.sql
sarbas
Forum Commoner
Posts: 64
Joined: Thu Jan 04, 2007 5:51 am

mysql -h localhost -u username -p databasename < filenam

Post by sarbas »

Hi

Thank you for your kind reply , I used the below command suggest by you

mysql -h localhost -u username -p databasename < filename.sql

while using the above option I got the following error.

[root@dhcppc0 phpmyadmin]# mysql -h localhost -u root -p askpert1 < askpert.sql
bash: mysql: command not found



Is there any error in my mysql configuration , Actually I'm using LAMPP .
my data base file is in a text file on the desktop. My lampp PhPmyadmin in the folder of
/opt/lampp/phpmyadmin

Please help me with full details .
Post Reply