Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Failed to connect to database MyData as MyUser@localhost

Status
Not open for further replies.

FoxT2

MIS
Oct 3, 2003
143
US
Hi,

I am using MySQL 5.0. And so far, every attempt I have made to get any of my applications to connect to any database I create has failed. I have tried create several different user accounts in many different ways, and still none can connect to a MySQL database. Even when I use the superadmin account (username = root, password = ****), none of my applications can connect to the database. The ONLY WAY I have been able to get my applications to see a database is to install MySQL 5.0 and check add an anonymous-user account. And then tell my application...

host = localhost
username =""
password =""

then it works fine. What am I missing here! I DO NOT want to have to use an anonymous-user account! Apparently I am setting something up wrong but after 2 days on this, I cannot figure it out. Could someone give me some pointers on what direction to go from here. Here are some examples of how I have created some accounts that are not working...

GRANT ALL PRIVILEGES ON *.* TO hubert@localhost IDENTIFIED BY 'password'

GRANT ALL PRIVILEGES ON *.* TO 'temp2'@'%' IDENTIFIED BY 'pass' WITH GRANT OPTION

GRANT ALL PRIVILEGES ON *.* TO 'temp2'@'localhost' IDENTIFIED BY 'pass' WITH GRANT OPTION

GRANT ALL ON MyData.* TO 'MyUser'@'localhost' IDENTIFIED BY 'abc123'

I have also tried setting up user accounts in the Administrator GUI 1.1.9 that you download from MySQL.com, but still now luck.

Thanks,
FoxT

 
Could it have anything to do with the fact that I'm using PHP 4.4.2? Do I need PHP 5+?

 
Thank for the reply sleipnir,

Ok I finally got it! MySQL 5.0 does not like PHP 4+ from my findings. It does work well with PHP 5+. By getting the PHP 5.1.4 installtion to work it has solved all my problems.

FoxT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top