Until yesterday (when I started playing with the command line), everything was running well and I had a successful connection between mysql and php. At one point I added
sudo cp /private/etc/php.ini.default /private/etc/php.ini
which was not what I wanted (that will teach me to copy and paste!), but I checked and everything was running fine after that.
After restarting my computer the connection to mysql does not seem to be working. So I tried
sudo cp /private/etc/php.ini /private/etc/php.ini.default
in the hope that was the culprit but I have had no success.
Ive opened up mysql workbench and can see that all my tables are still there, I have run a simple echo script and php works fine by itself.
How do I relink the php and mysql?
===EDIT===
I have just tried show databases;
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.01 sec)
This is not what my mysqlworkbench shows, which show 9 different databases. Is it possible I have to mysql running on here and if so how do I get rid of one? (to be more specific the above that is returned in my command line)