Skip navigation
This discussion is locked
Currently Being Moderated

Access denied for ODBC/SYSTEM@localhost (using password: NO)

Sep 22, 2009 11:55 AM

When trying to insert or update records into a MySQL database, some people get an error message that looks similar to this:

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\htdocs\mysite\TMPbcn96qcid9.php on line 20

The username might also be SYSTEM, instead of ODBC.


The problem is that you're trying to interact with the database using a temporary file (the clue is in the file name, which begins with TMP). This prevents PHP from accessing the MySQL connection, resulting in access being denied.


The solution is simple:

  1. Open the Preferences panel from the Edit menu (or Dreamweaver menu on a Mac).
  2. Select the Preview in Browser category.
  3. Deselect the option to preview using a temporary file.
  4. Click OK.


As long as your testing server definition and MySQL connection details are correct, you should now be able to insert and update records.


More Like This

  • Retrieving data ...

Bookmarked By (0)