[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MySQL problems

I fixed it. I just deleted the mysql directory at /var/lib, and did an apt-get remove then apt-get install for both mysql-server and mysql-client. I'm just having some difficulties basically because the book I'm reading covers MySQL and PHP on Windows, and there are those annoying setup differences.

On 18/06/2006, at 6:07 PM, Jim Popovitch wrote:

I've seen this behavior before with MySQL. The issue is that MySQL uses not only your login name but also the hostname it sees you logging in from. For instance in the MySQL user table there will be entries like this:

  name  host		password
  root localhost	123abc
  bob  *		123abc
  tom  vixen		123abc

Based on the above root can only login from the localhost, bob can login from anywhere, but tom can only login from host vixen. Make sense?

So your issue is that mysql stored a hostname for user root when mysql was setup. Debian uses localhost.localdomain for, but for some reason MySQL only stores localhost in the user table. Try changing localhost.localdomain to just localhost in /etc/hosts, then try relogging into MySQL. You may have to reboot to make this work (to reset hostname setup), I forget if just editing /etc/hosts will make it work.

Good luck,

-Jim P.

Xavier Elizalde wrote:
I've been trying to set up MySQL and the book I've been using had me set a password for the root user. However, I can't seem to log into MySQL using that password now. Perhaps there was a typo when I was entering it, but I can't seem to do anything about it now. I've been searching for documentation on what to do, but all I can find is documentation about windows, or documentation that just isn't clear. Can I just uninstall MySQL and re-install it, and just reset everything so I can start up from scratch again? --To UNSUBSCRIBE, email to debian-user- REQUEST@lists.debian.orgwith a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: