[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Mysql error msg :" Access denied for user 'ODBC'@'localhost'  (using password: NO)"

Posted on 2006-06-19
3
Medium Priority
?
1,229 Views
Last Modified: 2007-12-19
I receive this error msg :"Access denied for user 'ODBC'@'localhost' (using password: NO)" when i try and access a mysql database with php. I even receive the msg when i try a simple database connection featured in the code below:

$link = mysql_connect("localhost", "username", "password")
   or die ("Could not connect: ". mysql_error());

The username and password are also correct and i have comformed that. Does anyone have any ideas?
0
Comment
Question by:cjevic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
Khanh Doan earned 2000 total points
ID: 16939050
Have you ever try connect to your db by phpMyAdmin ?
Do you install ODBC or smth else like that ? 'Cause ODBC is Open Database Connectivity and it used by Windows user.
0
 
LVL 14

Expert Comment

by:ppfoong
ID: 16939169

The message (using password: NO) means that you did not pass any password information to the connection, assuming that there is no password required. If there is a password, you need to connect using the -p parameter, and there should be no space between -p and the actual password. Eg. if the password is 12345, you should put -p12345 .

In addition, if you can login with other user such as root@localhost, you can check the permission for ODBC@localhost using this command:

SHOW GRANTS FOR ODBC@localhost;
0
 
LVL 2

Expert Comment

by:PurpleSlade
ID: 17111671
Out of curiosity, are you trying to access the database from another script?  If not and you get this message, are you sure that MySQL *server* is running?  You might try typing

'net start mysql' in the command window to make sure to see if it is installed as a service.
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question