Web Analytics Made Easy -
StatCounter a new database in phpmyadmin - CodingForum

Announcement

Collapse
No announcement yet.

a new database in phpmyadmin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • a new database in phpmyadmin

    Hi, I want to creat a new database in phpmyadmin like this:
    Code:
    CREATE TABLE users (
        username varchar(30),
        password varchar(32));
    But I only can put this commands in other already created. How can I creat one new like this? thanks

  • #2
    well i achive to do the tables. however i could not conect.

    I use this code:

    Code:
    <?
    
    /**
     * Connect to the mysql database.
     */
    $conn = mysql_connect("localhost", "username", "PASSWORD") or die(mysql_error());
    mysql_select_db('test', $conn) or die(mysql_error());
    
    ?>
    however it gives me this error:


    Warning: mysql_connect(): Access denied for user: '[email protected]' (Using password: YES) in C:\Program Files\DzSoft\PHP Editor\phpBD.tmp on line 6
    Access denied for user: '[email protected]' (Using password: YES)

    thanks in advance.

    Comment


    • #3
      Is this on your own pc or on a hosts server? That error usually means that your password is incorrect. If it's on your own pc, the username will be root and password is usually blank

      Comment


      • #4
        it's in my pc...but i defined the user and pass when i've creat the table.

        Comment


        • #5
          It doesn't get the database username and password from any tables.
          Change
          PHP Code:
          $conn mysql_connect("localhost""username""PASSWORD") or die(mysql_error()); 
          to
          PHP Code:
          $conn mysql_connect("localhost""root""") or die(mysql_error()); 
          If you think about it, if you can't connect to the database, how would you be able to retrieve the database username and password from the database? I believe the database username and password is found in a file called my.ini but I can't be held against that
          Last edited by Nightfire; Feb 26, 2004, 09:31 PM.

          Comment


          • #6
            ok...thanks.. it worked

            Comment

            Working...
            X