Getting started with WAMP: setting up

Memory exhausted problem

“Allowed memory size of 134217728 bytes exhausted”
I encountered this problem a few times, and setting memory_limit to a higher value didn’t seem to work

In php.ini:
memory_limit = -1;

Changing www root on WAMP

Open httpd.conf

Change

Listen 0.0.0.0:80
Listen [::0]:80

to

Listen 127.0.0.1:80
Listen [::1]:80

Change

DocumentRoot "C:/wamp/www/"

to

DocumentRoot "C:/Users/name/Sites/localhostwamp/"

Change

</pre>
<Directory "C:/wamp/www/">
<pre>

to

</pre>
<Directory "C:/Users/.../Sites/localhostwamp/">
<pre>

Setting mySQL password

go to shell (right click mysql shell in taskbar)

update mysql.user set Password = password('yourPasword') where User = 'root';
flush privileges;

go to phpmyadmin directory c:\…\wamp2.5\apps\phpmyadmin4.1.14\config.inc.php

replace:

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

with

$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';

Or watch this dummy video tutorial:

Set login session to something less restrictive for testing purposes

in your config.inc.php file (apps/phpmyadmin…)

$cfg['LoginCookieValidity'] = 604800; /* 1 week */
$cfg['MaxNavigationItems'] = 1000;

mysql error logging

add these lines to my.ini

log-queries-not-using-indexes
log-warnings
long_query_time = 2
log=C:/Webservers/wamp2/logs/querylog.log
log-slow-queries=C:/Webservers/wamp2/logs/SlowQueryLog.log

import sql-data into mySQL database

Right click Wamp icon in taskbar > mySQL

show databases;
use <databasename>;
source c:\Temp\queries.sql;

mysqldump in wamp (not via mysql console!)

Go to the wamp mysql directory via cmd prompt

cd c:\Webservers\wamp2\bin\mysql\mysql5.6.17\bin\

Now ‘all’ mysql commands are available:

mysqldump -u root -p dbname table1 table2 > output.sql

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.