Jump to content
Sign in to follow this  
Tony

Database Error

Recommended Posts

Salam geng..aku ade masalah dgn phpmyadmin nih..dh puas mencari x jumpa jugak resolutionnye.. so nk minta bantuan geng semua.. aku buat satu sistem guna PHP dgn mysql sbagai database dia..snang cite aku guna easyphp.. aku buat sistem tu kat PC lain then sbb nak pindah masuk dlm laptop.. aku copy semua fail .php dlm root directory aku... then aku export data dari phpmyadmin format .sql... kendian aku paste semua fail .php dan upload fail .sql aku kat phpmyadmin dalam laptop...masalahnya bila aku open http://localhost/page-aku utk tngok fail database tu di keluar error nih..

Warning: mysql_connect(): Access denied for user 'mmdb'@'localhost' (using password: YES) in c:\program files\easyphp1-8\www\multi\listall.php on line 29

Warning: mysql_select_db(): Access denied for user 'ODBC'@'localhost' (using password: NO) in c:\program files\easyphp1-8\www\multi\listall.php on line 30

Warning: mysql_select_db(): A link to the server could not be established in c:\program files\easyphp1-8\www\multi\listall.php on line 30

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-8\www\multi\listall.php on line 33

ID Name NRIC Phone Email Website Occupation Process Process

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp1-8\www\multi\listall.php on line 49

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-8\www\multi\listall.php on line 71

Apa maslah dia?... x bleh connect ke? aku assume yg tu..so mcm mane?..please..

Edited by tony_eusoff

Share this post


Link to post
Share on other sites

ermm itu maksudnya database ko ada masaalah dengan previlege

ko kena buat user baru dekat database baru ko...

Line below indicated that ur databse is acces using username of mmdb with password...

Warning: mysql_connect(): Access denied for user 'mmdb'@'localhost' (using password: YES) in c:\program files\easyphp1-8\www\multi\listall.php on line 29

ko pergi dekat phpmyadmin...klik dekat previllege...create new user..

pastu ko modified ko punya php file yg ada information utk buat connection kpd database...

that should solve ur prob...

Share this post


Link to post
Share on other sites

ermm itu maksudnya database ko ada masaalah dengan previlege

ko kena buat user baru dekat database baru ko...

Line below indicated that ur databse is acces using username of mmdb with password...

Warning: mysql_connect(): Access denied for user 'mmdb'@'localhost' (using password: YES) in c:\program files\easyphp1-8\www\multi\listall.php on line 29

ko pergi dekat phpmyadmin...klik dekat previllege...create new user..

pastu ko modified ko punya php file yg ada information utk buat connection kpd database...

that should solve ur prob...

Tang modified tu aku dh x reti :ph34r: ... snang ni coding PHP aku..

<?php      
            $connect=mysql_connect('localhost','mmdb','mmdb');
              mysql_select_db('mmdb');
            $SQLcommand = "SELECT * FROM users";
          
            $result = mysql_query($SQLcommand, $connect);
            
            print "<table width=\"500\">";
            print "<tr bgcolor=\"#DDDDDD\">";
            print "<td>ID</td>";
            print "<td>Name</td>";
            print "<td>NRIC</td>";
            print "<td>Phone</td>";
            print "<td>Email</td>";
            print "<td>Website</td>";
            print "<td>Occupation</td>";
            print "<td>Process</td>";
            print "<td>Process</td>";
            
            print "</tr>";
          
              while($row = mysql_fetch_row($result))
              {
                print "<tr bgcolor=\"#EEEEEE\">";
                  print "<td> $row[0] </td>";
                  print "<td> $row[1] </td>";
                  print "<td> $row[2] </td>";
                  print "<td> $row[3] </td>";
                  print "<td> $row[4] </td>";
                  print "<td> $row[5] </td>";
                  print "<td> $row[6] </td>";
                  
                  print "<td>";
                      print "<a href =\"viewUser.php?ID=";
                      print $row[0];
                      print "\">";
                      print "[view]";
                      print"</a>";
                  print "</td>";
                  print "<td> $row[6] </td>";
                print "</tr>";              
              }
          print "</table>";
          mysql_close($connect);
        ?>

klu ade explanation yg detail pun ok jgk MR.slier.. :blush:

Share this post


Link to post
Share on other sites

Tengok line ni

$connect=mysql_connect('localhost','mmdb','mmdb');

localhost <---ni maksudnya local database

mmdb yg pertama <----userName utk acces database

mmdb yg kedua<------password utk acces database

so ko pergi la dekat phpmyadmin,cari button previllege dan cretae new user

ala ko buat jer bagi sama dgn file ko ni...

userName=mmdb

password=mmdb

that should solved ur problem...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...