• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3321
  • Last Modified:

Error 1045 when using MySQL or SQLyog


I wanted to start using PHP and MySQL on my system so I installed the most recent copies of PHP (4.3.10) and MySQL (Server 4.1).

I chose all the default config settings for MySQL and didnt set any passwords.

When I use a command prompt and enter mysql the following occurs:

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

I installed a program called SQLyog and it gives the same error when connecting using:
host address: localhost
username: root
port 3306

After looking at the many solutions available on the net I can still not solve the problem.

Here are some more details:

I'm running Windows XP Pro Service pack 2

Norton Internet Security 2005 (have tried turning this off)

I use Internet Information Services 4 successfully running ASP pages. I have tested PHP pages and they work fine too.

MySql is installed at C:\Program Files\MySQL\MySQL Server 4.1

the my.ini file says:



# ----------------------------------------------------------------------
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.

# The TCP/IP Port the MySQL Server will listen on

#Path to installation directory. All paths are usually resolved relative to this.
basedir="C:/Program Files/MySQL/MySQL Server 4.1/"

#Path to the database root
datadir="C:/Program Files/MySQL/MySQL Server 4.1/Data/"

# The default character set that will be used when a new schema or table is
# created and no character set is defined

# The default storage engine that will be used when create new tables when

I would appreciate any help you can give.
  • 2
1 Solution
UmeshMySQL Principle Technical Support EngineerCommented:

Take a look at here..


(For windows 2k/XP)
Also not that when you follow default installtion options it would install in C:/Program Files/MySQL/MySQL Server 4.1/...so on..
because of space between dir it causes problem while starting/stoping service..so better to install it in C:/MySQL

Hope This Helps!
UmeshMySQL Principle Technical Support EngineerCommented:
Any updates?

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now