Database And Apache Help

Database


# Import SQL file by command line in Windows

syntax: 
C:\xampp\mysql\bin\mysql -u {username} -p {databasename} < file_name.sql
Example:
C:\xampp\htdocs\glideline>C:\xampp\mysql\bin\mysql -u root -p glideline_new < "F:\Computer\Website & Theme\Custom Sites\Glideline\glideline (1).sql"
Enter password: Enter


Apache started but phpmyadmin not opening in ubuntu

  1. First check phpmyadmin installed or not
    ls /opt/lampp/phpmyadmin

If folder available (means phpmyadmin installed)
2. Change the port 81 to 80 in conf file:
sudo nano /opt/lampp/etc/httpd.conf

        3. Restart apache

# Resolve SQL File Size Issue

First check the path of the php.ini file

Path:
php.ini file in Ubuntu: opt/lampp/etc/php.ini
my.ini file in Ubuntu: opt/lampp/etc/my.conf In windows we can go from the xampp panel directly

Update in php.ini
post_max_size = 40M -> 400M
upload_max_filesize = 40M -> 400M
max_execution_time = 120 -> 1200
memory_limit = 512M -> 5120M



Update in my.ini

max_allowed_packet=1M -> 100M



# Transfer data from one table to another table

INSERT INTO 

user2 (id, name, email, email_verified_at, password, remember_token, created_at, updated_at) 

SELECT id, name, email, email_verified_at, password, remember_token, created_at, updated_at FROM users;


Post a Comment

0 Comments

Visual Studio