Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to import large sql file in phpmyadmin in ubuntu

->/opt/lampp/etc/php.ini
1)increase them accordingly 
 post_max_size=500M
upload_max_filesize=500M
max_input_time = 600
memory_limit=900M
max_execution_time=-1

->in opt/lampp/etc/my.cnf
max_allowed_packet=1000
innodb_log_file_size = 50M

->phpMyAdminlibrariesconfig.default.php
$cfg['ExecTimeLimit'] = 0;
______________________________________________
2nd method 

goto lampp/phpmyadmin
create two folders in the same directory namely save and upload 

goto lampp/phpmyadmin/config.inc.php
$cfg['UploadDir'] = '/opt/lampp/phpmyadmin/upload';
$cfg['SaveDir'] = '/opt/lampp/phpmyadmin/save';

save 
and then put the large .SQL file into the upload folder 
it will come under the import page automatically
Comment

how to upload large sql file in phpmyadmin

Solution 1:

in php.ini of your php installation (note: depending if you want it for CLI, apache, or nginx, find the right php.ini to manipulate)

post_max_size=500M
upload_max_filesize=500M
memory_limit=900M


Solution 2:
1. first of all, we need to open the command prompt in administrator privilege.
2. furthermore, change your location to “C:xamppmysqlin>mysql“. run command: ” cd C:xamppmysqlin>mysql “
3. after that you need to run this command: “mysql -u {DB_USER} -p {DB_NAME} < path/to/file/ab.sql ” where you have to enter your database user_name and database name. In my case my
DB_USER : root && my
DB_NAME: vintagehome && we need vh_backup.sql file to import with the complete path.
finally merging both 2nd and 3rd point the whole syntax is :

“C:xamppmysqlin>mysql -u {DB_USER} -p {DB_NAME} < path/to/file/ab.sql “

here is the code That I execute for importing SQL file:
my database name DB_NAME: vintageh_vintagehome
user name DB_USER: root
DB password: root
SQL file name: vh_backup

“mysql -u root -p vintageh_vintagehome < D:downloadssqlvh_backup.sql“

furthermore, the password of DB user is required. In my case, the password: root.
Comment

import big sql file phpmyadmin

Try to import it from mysql console as per the taste of your OS.

mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file.sql path}
or if it's on a remote server use the -h flag to specify the host.

mysql -u {DB-USER-NAME} -h {MySQL-SERVER-HOST-NAME} -p {DB-NAME} < {db.file.sql path}
Comment

PREVIOUS NEXT
Code Example
Sql :: pl/sql loop example 
Sql :: permission denied postgres copy csv command line 
Sql :: insert output identity 
Sql :: sql server concat string and int 
Sql :: oracle show column of table 
Sql :: how to unlock table in sql server 
Sql :: count characters of string mysql 
Sql :: sql decimal vs float 
Sql :: how to find sql server agent jobs related to a database 
Sql :: pl/sql cursor 
Sql :: lowest salary in sql 
Sql :: drop row pgadmin 
Sql :: postgresql add leading zeros 
Sql :: savepoint in sql 
Sql :: run sql file in terminal 
Sql :: create_engine sqlalchemy with parsed url sql server 
Sql :: sql stored procedure with output parameters 
Sql :: sql get month from date 
Sql :: oracle list datafiles 
Sql :: mysql ip address data type 
Sql :: how to run mysql on terminal mac 
Sql :: does insert into overwrite sql 
Sql :: update with select postgresql 
Sql :: mysql delete table with foreign key 
Sql :: print hello world in plsql 
Sql :: how to insert multiple rows in sql 
Sql :: sql date format dd-mm-yyyy 
Sql :: sql change date format 
Sql :: install postgresql 10 centos 7 
Sql :: activate log mysql 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =