First, click Wampserver.exe Default Installation
Second, after the successful installation test (1)Test the basic configuration Browser address bar inputhttp://localhost/index.phperror occurred: You don't have permission to access/on the This server Address field Input: http://127.0.0.1/index.php success Error Reason: Configuration issue
Workaround:
Find httpd.conf and open it with Notepad.httpd.conf, and then
<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
Switch
<Directory/>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
The following
# onlineoffline tag - don‘t remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
whichDeny from allSwitchAllow from all ,Restart all services Now with the browserrespectivelyType the previous two address bar can be successfully accessed, click on the page link phpmyadmin time appears "You don't have permission to access/phpmyadmin/on the this server. " Workaround:
use Notepad to open the phpadmin.conf in the alias directory in the Wamp installation directoryfile (e.g.)Will
<Directory"D:/wamp/apps/phpmyadmin3.4.10.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
whichDeny from allSwitchAllow from all ,Restart all services (2)test MySQL In the browser address bar, type: locahost/testmysql.php An error occurred: Open the testmysql.php code as in Notepad as follows
<?php
$link = mysql_connect(‘hostname‘,‘mysql_user‘,‘mysql_password‘);
if(!$link){
die(‘Could not connect to MySQL: ‘. mysql_error());
}
echo ‘Connection OK‘; mysql_close($link);
?>
Check out the PHP Manual: mysql_connect () function where parameters: hostname: MySQL Server. You can include a port number, such as "Hostname:port", or a path to a local socket, such as ":/path/to/socket" for localhost. mysql_user: user name. The default value is determined byMysql.default_userdefined. In theSQL security Mode, the parameter is ignored and always uses the user name of the server process owner. Mysql_password:
password. The default value is determined byMysql.default_passworddefined. In theSQL security Mode, the parameter is ignored, and a blank password is always used.
Wampserver in the default installation when the user name of MySQL and the user password are the default, do not need to add parameters, where the server name defaults to localhost:3306 rewrite the above code to:
<?php
$link = mysql_connect(‘localhost:3306‘);
if(!$link){
die(‘Could not connect to MySQL: ‘. mysql_error());
}
echo ‘Connection OK‘; mysql_close($link);
?>
Retype the address, the link succeeds (for example):
To Add a link password:
# The following options will be passed to all MySQL clients
[client]
password=1234
port=3306
socket=/tmp/mysql.sock
Under [client] add password =xxxx you want to add the password in [Wampmysqld] under the password=xxxx added, save
[wampmysqld]
password =1234
port= 3306
socket= /tmp/mysql.sock
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
basedir=D:/wamp/bin/mysql/mysql5.5.20
log-error=D:/wamp/logs/mysql.log
datadir=D:/wamp/bin/mysql/mysql5.5.20/data
This time the source code in testmysql.php is modified to:
<?php
$link = mysql_connect(‘localhost:3306‘,‘1234‘);
if(!$link){
die(‘Could not connect to MySQL: ‘. mysql_error());
}
echo ‘Connection OK‘; mysql_close($link);
?>
Re-type in the browser address bar to display the link successfully
From for notes (Wiz)
Installation and use of Wampserver