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!

Cannot connect to MySQL

Status
Not open for further replies.

apex2000

Programmer
Apr 13, 2003
3
TH
Hi, I am a novice with MySQL/PHP/phpMyAdmin. Having said that, I have all three set up and working on my local machine as follows:

WinXP Pro [SP1] on P.IV 1.8GHz using IIS 5.0
MySQL 3.23.49-nt
PHP 4.3.1
phpMyAdmin 2.4.0

I have used the three to produce a working website without any problems.

Noticing that MySQL 4.0.12 was available, I downloaded and installed it together with the MyODBC 3.51 driver. Since doing that, I find that I cannot connect to the MySQL database locally!

These are differences I have noticed:

1. When running WinMySQL Admin 1.4, on the 'Process' tab, the host is shown as 'localhost' with MySQL 3.23.49. When running the same on 4.0.12, the host is shown as '127.0.0.1:port number'.
Why has that changed?

2. When I try to connect to the database through phpMyAdmin, it tells me that access is denied to username@127.0.0.1 . I tried changing the host name in config.inc.php from 'localhost' to '127.0.0.1' but the problem still occurs.
How do I get over this?

3. The same as in [2.] above when using DreamWeaverMX; I cannot access my database locally.
Same as [2.]

I am obviously doing something wrong and it's probably something very basic.

Can someone help me solve this dilemma in layman's terms without too much 'techno-speak' . I will be eternally grateful for anyone's help.

 

It may be that you needed to run mysqldump.exe on the databases before you upgraded.


tgus

____________________________
Families can be together forever...
 
Thanks tgus. Please excuse my ignorance on this one. Do you mean that I should run mysqldump.exe from the ../bin folder? If so, could you explain to me what that does? If not so, could you explain in more detail?

thanks again for your help.

Peter.
 
MySQL dump is a dump utility to create a plain text backup of a database. If you can't connect you obviously can't run it. It would have been wise to backup your db before upgrading.

To use it run

c:\mysql\bin\mysqldump -u root -ppassword DBnane > c:\outputfile.sql

But now, answering your question
You have to reset your privileges and set it from scratch.
I have already answered somethign similar so read my reply at this post

thread436-526903 doing this anyway, backup up your databases by copying all files in the mysql\data directory.

Concerning your host address then, you can edit directly the c:\windows\my.ini file and set it back to normal.

Don't get fooled by the username and password listing in my.ini; those are only to start the service and not to access the server.


Bye

Qatqat

The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top