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!

Can't log into MySQL

Status
Not open for further replies.

UltraBob

IS-IT--Management
Jan 19, 2004
1
JP
Hi All,

I'm sure someone will think this is a pretty stupid question, but I have never encountered anything like it, and google didn't turn anything up for me so I thought I would try here.

I am preparing a new server (FreeBSD, MySQL 4.1.1) and I can't connect to the server. I was able to connect for a little while, and I set the root passwords and removed the guest accounts. Things were going fine until I shutdown mysql and restarted it a bit later (can't remember what exactly I did in the meantime).

Now when I try to connect to the mysql server '

Code:
mysql -u root -p

' I get this:

Code:
ERROR 1045 (28000): Access denied for user: 'root'@'localhost' (Using password: YES)

I checked the log file in

Code:
/var/db/mysql/hostname.err

and I see the following:

Code:
040119 22:05:18  mysqld started
040119 22:05:19  InnoDB: Started; log sequence number 0 43902
040119 22:05:19  Found 4.1 style password for user 'root@localhost'. Ignoring user. You should change password for this user.
040119 22:05:19  Found 4.1 style password for user 'root@hostname'. Ignoring user. You should change password for this user.
/usr/local/libexec/mysqld: ready for connections.
Version: '4.1.1-alpha'  socket: '/tmp/mysql.sock'  port: 3306


I don't have any data on the server right now, so I don't mind wiping and reinitializing if that is what it takes, but

1) I'd like to know what is wrong
and
2) I haven't had any luck reinitializing

Any help would be greatly appreciated!

UltraBob
 
I think you set the user root with the sarver name, so in order to connect to MySQL issue:

mysql -h your_server -u root -p

Comprendez vouz?

Hope this help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top