Forum Moderators: coopster

Message Too Old, No Replies

Can't connect to mySQL db via PHP

Using PHP 4.3.0 and MySQL4 4.1.9

         

captdunsail

5:31 pm on May 29, 2005 (gmt 0)



I have SQL embedded in PHP, but none of the SQL is working. I have echoes that display OK and I can browse the table with phpMyAdmin.

I have coded "error_reporting(E_ALL);" but don't know where to look for messages.

In the mysql_connect I am using localhost and the username and password used to logon to my server.

Should I create a user in phpMyAdmin and connect with that one?

Blackie

7:44 am on May 30, 2005 (gmt 0)

10+ Year Member



Yes, you should have at least one user in MySQL, but as long as you do login to phpMyAdmin, you already have one, and can use the same user when connecting from inside the script.