Posted by:
RiggsFolly
(---.dynamic.dsl.as9105.com)
Your httpd -S looks OK
Is there something more to do.?
A.. I notice that selecting localhost from wampserver there is no connection to displayed database
Dont exactly follow this one! You create/view databases using phpMyAdmin
B.. There is no connection from database displayed under MyProjects
No there is not and should not be.
C.. There is no connection from database displayed under Virtual Hosts
Ditto
D.. In fact the only connection of any sort seems to be to the tables under phpMyAdmin
Correct
If phpMyAdmin can see the database then thats all you really need, but you can install any other tool that you like to aid in the design/development of database as long as it plays with MySQL.
I use MySQL Workbench. But if you try this, be careful to download only the workbench as one option will install another MySQL server and that will only server (pun intended) to confuse the issue.
There is a little script in \wamp\www\testmysql.php you can use to prove the connection between PHP and MySQL works.
You need to edit it to amend the parameters of the mysql_connect() function, like so
1. If you have not yet added a password to the root userid
<?php
//$link = mysql_connect('hostname','dbuser','dbpassword');
$link = mysql_connect('127.0.0.1','root','');
if (!$link) {
die('Could not connect to MySQL: ' . mysql_error());
}
echo 'Connection OK'; mysql_close($link);
?>
2. If you have added a password to the root userid
<?php
//$link = mysql_connect('hostname','dbuser','dbpassword');
$link = mysql_connect('127.0.0.1','root','YOUR_PASSWORD');
if (!$link) {
die('Could not connect to MySQL: ' . mysql_error());
}
echo 'Connection OK'; mysql_close($link);
?>
Then run it like this 'localhost/testmysql.php' (without the quotes)
This will actually test 2 things
1. That you can connect with PHP to MySQL, when you see
Connection OK2. That XDEBUG is working, as in PHP5.5.x the mysql_* extension, which this little tester uses, gives a depreceated message ( its not an error, just a informational warning).
If nothing else it serves as a warning/reminder not to use the mysql_* extension for any new code and to learn either mysqli_* or PDO.
---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>Read The Manuals Apache --
MySQL --
PHP --
phpMyAdminGet your Apache/MySQL/mariaDB/PHP ADDONs here from the
WAMPServer alternate Repo-X-X-X-
Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-