Showing posts with label WAMP. Show all posts
Showing posts with label WAMP. Show all posts

Wednesday, 3 July 2019

How to import an SQL file using the command line in MySQL?









#Step1: Create just databse in your phpMyAdmin
 Ex: test_table.sql

#Step2: put sql databse file in bin folder
 Ex: E:\wamp64\bin\mysql\mysql5.7.26\bin\DB\test_table.sql

# Open CMD
# Step3: Change the directory folder current directory to mysql bin directory.
 C:\Users\kishanvk>CD E:\wamp64\bin\mysql\mysql5.7.26\bin ↲
 C:\Users\kishanvk>E: ↲
 E:\wamp64\bin\mysql\mysql5.7.26\bin>

# Step4: write below command line and in this cmd
 E:\wamp64\bin\mysql\mysql5.7.26\bin>mysql -u [Username] -p [DBNAME] < DB\[DBNAME.sql] ↲

 Ex: E:\wamp64\bin\mysql\mysql5.7.26\bin>mysql -u root -p test_table < DB\test_table.sql ↲

# Step5: Enter password
 Enter password:***** ↲

# Step6: You can see imported database in your phpMyAdmin

Thursday, 6 December 2018

Export Database From MySQL






# Open CMD
# Step1: Change the directory folder current directory to mysql bin directory.
C:\Users\PHPKishan> cd D:\wamp64\bin\mysql\mysql5.7.19\bin ↲

# Step2: write below command line and in this cmd
D:\wamp64\bin\mysql\mysql5.7.19\bin>mysqldump --databases --user=[Username] --password [DBNAME] > [DIR PATH]\[DBNAME.sql] ↲

 EX D:\wamp64\bin\mysql\mysql5.7.19\bin>mysqldump --databases --user=root --password test_table > DB\test_table_bk.sql ↲

# Step3: Enter password
Enter password:***** ↲

# Step4: See exported database in you directory

Friday, 5 January 2018

WAMP: Missing http://localhost/ in urls , wrong WAMP projects url

1. Open wamp/www/index.php in Change

$suppress_localhost = ($wampConf['urlAddLocalhost'] == 'off' ? true : false);
To
$suppress_localhost = ($wampConf['urlAddLocalhost'] == 'on' ? true : false);

OR

2. From Wamp

  1. Right click on wamp icon on tray on the right.

  2. Go to "wamp settings"

  3. Enable "Add localhost in URL"