If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Access Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-04, 12:58
cordless cordless is offline
Registered User
 
Join Date: Jul 2004
Posts: 1
Access Error

Ok let me give you the lowdown:
I'm running MySQL 4.0.20a-nt on a Windows XP Pro Box. Install went fine. I set a password for root using: "mysqladmin -u root password 'mypasshere'" This *seemed* to work. I then try: "mysql -u root -p "mypasshere" and/or "mysql -u root -p" This returns: "ERROR 1045: Access denied for user: 'root@localhost' (Using Password NO). I also try: "mysqladmin -h localhost -u root -p "mypasshere" this produces a password prompt - I input the correct password and I get: "MYSQLADMIN: connect to server at 'localhost' failed error: 'Access denied for user: 'root@localhost' (Using Password: YES). I can login using: "mysql" and it works fine - no password required. I also edited my.ini using WinMySQLAdmin to read:
__________________________________________________ _______________
#This File was made using the WinMySQLAdmin 1.4 Tool
#7/2/2004 4:06:57 PM

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=e:/mysql
#bind-address=192.168.0.2
datadir=e:/mysql/data
#language=e:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=E:/mysql/bin/mysqld-nt.exe
user=root
password=oldtimer
QueryInterval=10
__________________________________________________ _______________

I'm not sure what the problem is here, but I cannot add users or access the database using root. There is one database in the server by default, the "test" database.
Any help appreciated!
Reply With Quote
  #2 (permalink)  
Old 07-11-04, 23:07
yellowmarker yellowmarker is offline
Registered User
 
Join Date: Jul 2004
Location: Dundee, Scotland
Posts: 107
Have you tried the following syntax:
shell> mysql --user=root --password=mypasshere test

where 'test' is the name of the database you wish to logon to on localhost.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On