Menu

Access denied for user 'nobody'@'localhost'

Help
Augusta
2009-05-07
2013-06-03
  • Augusta

    Augusta - 2009-05-07

    Hi, I hope in your help, sorry for this second topic but I installed another form on my website and now I got this error when I try to send the data via the form to the db:

    " Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO) in /public_html/form100823/processor.php on line 6
    Could not connect to database: Access denied for user 'nobody'@'localhost' (using password: NO) "

    can please someone explain me? thank you so much! :-)

    A.

     
    • TNTEverett

      TNTEverett - 2009-05-07

      Look for these lines in the processor.php file.  Six variables need to be in place for SQL to work. 

      include("config.inc.php");
      $link = mysql_connect($db_host,$db_user,$db_pass);
      mysql_select_db($db_name,$link);
      $query = "INSERT into `".$db_table."`

      And then the contents of the config.inc.php file.

      <?
      $db=1;
      $db_host="localhost";
      $db_name="yourdb";
      $db_table="yourdbtable";
      $db_user="validusername";
      $db_pass="validpassword";
      ?>

      If these don't look right then correct them. 

       
    • Augusta

      Augusta - 2009-05-07

      thank you for your answer! :)
      I have not the first parameter, $db=1; and I don't know what it means, but all the other parameters yes... now my config.inc.php it's like yours, here it is:

      <?
      // parameters
      $db=1;
      $dbms = 'mysql';
      $db_host = 'localhost';
      $db_name = 'mydbname';
      $db_table = 'tablenamei';
      $db_user = 'myusername';
      $db_pass = 'myrightpassword';
      ?>

      but  when I try to send my data I got the identical warning... :(

      another idea?
      please! thank you!
      A.

       
      • TNTEverett

        TNTEverett - 2009-05-07

        $db may not be used.  I know in legacy code (Ver 2.09) this was used to distinguish file db from SQL db.  In any case if it is still failing you need to check your MySQL db using your phpMyAdmin or similar tool to see if the db, table, username, and passwords are set. 
        You should be able to paste in php code queries (substituting varables with real values) and see that the queries work, and the data is what you expect. 

         
    • Augusta

      Augusta - 2009-05-08

      I solved! I created an empty "config.inc.php" file, uploaded in the script folder on my server.
      the install write the data, and now it works1
      thank you for your help :-)

      Ciao!
      A.

       

Log in to post a comment.