Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

acces mySQL phpMyAdmin

Status
Not open for further replies.
Mar 16, 2006
66
CA
Hi!
I am having a problem displaying data.

I want to acces mySQL phpMyAdmin

mysql_select_db("test_db ", $connection) or die("BAD DB SELECT");

i have a problem with identifying the database by its name
I think this is the problem
test_db
Thanks
 
try this and copy the error it comes back with:

Code:
$db=mysql_select_db("text_db",$connection) or die ([red]mysql_error()[/red]);

It might be that the user you are connecting with does not have access to that DB.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Hi Guys !

This is what i get when the code is

$db=mysql_select_db("text_db",$connection) or die (mysql_error());

Access denied for user: 'frank@localhost' to database 'text_db'

//////////////////

This is what i get when the code is

mysql_select_db("test_db", $connection) or die("BAD DB SELECT");

BAD DB SELECT
 
As Sleipnir said, the user does not have the proper permissions to access that database.

Check your user perissions. and modify as needed, or use a different user with the correct credentials.


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
I am at mySQL phpMyAdmin
I created a table here
Create new table on database test_db3
The name of the table is samplelinks
I could not start fresh I had to do it in test_db3
i have entered all fields like the tutorial

Since I created the samplelinks in the test_db3 .
Getting the path right is going to be a problem.
What do I do

$db = mysql_connect("localhost","yourname","password");
"yourname", i gues this will be the user name

Thanks
 
You need to select the database via the mysql_select_db() function, not in the mysql_connect(). For connect, I advise you leave it as localhost, unless you were told by your ISP to use something else. Your name is your mysql username and password is your mysql password. From then on, you have two options:

1. Either you select the database you need and work from there, or;
2. You skip the database selection and start with your queries.

Sometimes hosts will allow you only one database that will be automatically selected when you connect with your username and password. Since you're only allowed one database (which was predefined to you), you will not be able (or allowed) to issue the mysql_select_db() command. In that case you can just skip it. For all other purposes, you should do #1 first.
 
Hi Vragabond !
Thanks for that really helpful tip.
I talked to my hosting company about
mySQL phpMyAdmin
I have a lot of stuff there.
I dont know how it got there.
Anyway
I asked them to delete all that stuff.
They said they will do the deleting.
I am wondering
Isn't there a way to delete all that database myself
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top