Results 1 to 3 of 3
Related
-
FTP won't connect... Forum: Databases
Replies: 5 -
How to connect to database mysql Forum: Databases
Replies: 1 -
remote connect to Mysql Forum: PHP Forum
Replies: 8 -
Unable to connect to database Forum: CGI Perl Forum
Replies: 2
-
09-02-2006, 06:42 AM #1
i can connect, but i can't do anything
Now i can get a connection, but i can't do anything with this connection
whenever i attempt to select a database or tables,
it saying permission denied, see my code once Plz
$con=@mysql_pconnect("localhost","root","abcd");
if (!$con)
echo "<br>Unable to connect",mysql_error();
else
echo "<br>connected",mysql_error();
$dbcon=@mysql_select_db("project",$con);
if ($dbcon)
echo "<Br>Database Selected";
else
echo "<br>Database not selected",mysql_error();
I got this as a result
connected
Database not selectedAccess denied for user: 'root@localhost' to database 'project'
the same thing happens in console also, what can i do?
send a reply plz!!!!!!!!
Shyami
-
09-02-2006, 02:44 PM #2
Re: i can connect, but i can't do anything
Hi,
I use something like this for the db's I'm working on:
Code:<?php $db=mysql_pconnect('localhost','user','passwd'); if (!$db) { echo 'Error: Could not connect to database. Contact the Administrator.'; exit; } mysql_select_db('database'); $query = "insert into table values ('".firstvalue."', '".secondvalue."')"; $result = mysql_query($query); . . . ?>
U
-
09-05-2006, 09:02 AM #3
Re: i can connect, but i can't do anything
Try removing the '@' from the commands and see if there are any warnings that shed any more light on the matter.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum