You have not included the PHP tag for this and it sounds like you're trying to use PHP connection code to access a MySQL database. You need to first understand a couple concepts with your server environment.
Your Server is the computer running the software
Your Database Server is MySQL (software running on the computer)
Your Host is the IP address or HOSTNAME of the computer (i.e. localhost or 127.0.0.1)
Your Database Name is the name of the database you create (I'll get to that)
PhpMyAdmin is a web-based application that allows you to manipulate your MySQL database
Okay let's start with PhpMyAdmin and creating your first database:
If you click the "house" icon on the left you will be on the home screen and you will see a form field in the main content area you can type in a database name and "Create New Database" then click "Create". Type in myfirstdb if that is the name of the database and click "Create"
This will refresh the column to the left and there is a drop-down (combo) menu that displays the database names (like the ones you mentioned). You should now see myfirstdb listed there too. Select it.
Now you will see very little content but in the right main content area at the bottom is a form field that allows you to create a table name and determine how many fields it has. Type in users and select 4 as the number of fields. Then click "Go" to the far right.
A form displays 4 rows and you must name your fields (columns) and I suggest you name the following and choose the following data types:
id INT AUTO_INCREMENT
name VARCHAR(48)
username VARCHAR(24)
password VARCHAR(24)
be sure to check the small key icon next to the id field to declare it as primary key. Then click "Go" to create your table users.
Congratulations, you've created your first table. Now if you're feeling brave, you could skip these steps and click the "SQL" tab in PhpMyAdmin and paste the following SQL code and it will create the table as well:
CREATE TABLE users (id INT AUTO_INCREMENT, name VARCHAR(48), username VARCHAR(24), password VARCHAR(24), PRIMARY KEY (id));
The code you were trying in your question is PHP code to connect to a database. Here is an example of a proper connection assuming you followed the instructions above:
<?php
// Make a MySQL Connection
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("myfirstdb") or die(mysql_error());
// Retrieve all the data from the "example" table
$result = mysql_query("SELECT * FROM users")
or die(mysql_error());
// store the record of the "example" table into $row
$row = mysql_fetch_array( $result );
// Print out the contents of the entry
echo "Name: ".$row['name'];
echo "User: ".$row['username'];
echo "Pass: ".$row['password'];
?>
Note that we have not stored any data into your table, so you can click the "Insert" tab in PhpMyAdmin for that selected users table and insert rows, or you can insert them using SQL. Example SQL to insert a couple users (click the SQL tab and paste this):
INSERT INTO users VALUES (1, "My Buddy", "user1", "password1"), (2, "My Enemy", "badguy1", "password2");
From here you really need to read some tutorials online step-by-step to create an application. Your login script will require HTML programming for your form, then PHP programming to receive the form submission, then PHP + SQL programming to check the user against the database. Search for an example and use these basics to create what you need.