When trying to run the below script on an apache/1.3.26 with mysql and
php I get the following error message:
Warning: mysql_connect() [function.mysql-connect]: Access denied for
user: 'n*****@softwar e-ece.rutgers.edu ' (Using password: YES) in
/ece/under/group14/public_html/insert.php on line 7
Unable to Select database
I have no idea what the cause is, any help would be appreciated.
Thanks in advance.
<?
$username = "group29";
$password = "xxxxxx";
$database = "group29";
mysql_connect(' software-ece.rutgers.edu :3306',$user,$p assword);
@mysql_select_d b($database) or die("Unable to Select database");
$query="CREATE TABLE contacts(id int(6) NOT NULL auto increment, first
varchar(15) NOT
NULL, last varchar(15) NOT NULL, phone varchar(30) NOT NULL, mobile
varchar(20) NOT NULL,
fax varchar(20) NOT NULL, email varchar(30) NOT NULL, web varchar(30)
NOT NULL,
PRIMARY KEY(id), UNIQUE id(id), KEY id_2(id))";
mysql_query($qu ery);
mysql_close();
?> 3 49551
That error means that the database group29 doesn't exist. Check your
database names.
"photoelect ric" <lu*******@aol. com> wrote in message
news:a9******** *************** ***@posting.goo gle.com... When trying to run the below script on an apache/1.3.26 with mysql and php I get the following error message:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'n*****@softwar e-ece.rutgers.edu ' (Using password: YES) in /ece/under/group14/public_html/insert.php on line 7 Unable to Select database
I have no idea what the cause is, any help would be appreciated. Thanks in advance.
<? $username = "group29"; $password = "xxxxxx"; $database = "group29";
mysql_connect(' software-ece.rutgers.edu :3306',$user,$p assword); @mysql_select_d b($database) or die("Unable to Select database");
$query="CREATE TABLE contacts(id int(6) NOT NULL auto increment, first varchar(15) NOT NULL, last varchar(15) NOT NULL, phone varchar(30) NOT NULL, mobile varchar(20) NOT NULL, fax varchar(20) NOT NULL, email varchar(30) NOT NULL, web varchar(30) NOT NULL, PRIMARY KEY(id), UNIQUE id(id), KEY id_2(id))";
mysql_query($qu ery); mysql_close(); ?>
In article <a9************ **************@ posting.google. com>, photoelectric wrote: Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'n*****@softwar e-ece.rutgers.edu ' (Using password: YES) in /ece/under/group14/public_html/insert.php on line 7 Unable to Select database
So it says that the user nobody@host is not allowed to use $database.
<? $username = "group29"; $password = "xxxxxx"; $database = "group29";
mysql_connect(' software-ece.rutgers.edu :3306',$user,$p assword);
Should be $username instead of $user.
Just as with mysql_select_db below, you could write
mysql_connect(' host','user','p ass') or die (mysql_error()) ;
-- http://home.mysth.be/~timvw
"Tim Van Wassenhove" wrote $username = "group29";
[...] mysql_connect(' software-ece.rutgers.edu :3306',$user,$p assword);
Should be $username instead of $user.
....which the original poster would have easily detected when enabling a
stricter syntax, either in code, per-directory in Apache's .htaccess or even
globally in php.ini: http://php.net/errorfunc
Adriaan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ryan Schefke |
last post by:
------=_NextPart_000_0077_01C34C8B.2B90C960
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
..I just sent this out to the win32 distribution list but no one has
replied.can someone on this list please help? The issue should be
trivial for experienced MySQL users, I'm just a novice, thanks!
|
by: George Hester |
last post by:
Please take a look at this google artcle:
http://groups.google.com/groups?hl=en&lr=&frame=right&th=55d6f4b50f5f9382&seekm=411f370d%241%40olaf.komtel.net#link9
The op was having trouble with access denied using resizeTo. I am having the same issue
but the explanations in this article don't seem to apply here. I am not trying to
resize a window with content from a different server. This issue lies here.
What I do is make a popup...
|
by: jolinlim |
last post by:
Warning: mysql_connect(): Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\appserv\www\sql.php on line 12
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in c:\appserv\www\sql.php on line 13
Warning: mysql_query(): Access denied for user: 'ODBC@localhost' (Using password: NO) in c:\appserv\www\sql.php on line 14
Warning: mysql_query(): A link to the server could not be established in...
|
by: servo |
last post by:
I created a user "test1" (which then got the username "debscrof_test1" from CPanel), a password for the user "test2", and then added the user to a new database "testdb" with all priviliges
Then a simple script to connect to the database (as I am trying to locate the source of the errors), as per below:
<?php
$dbhost = "localhost";
$dbuser = "debscrof_test1";
$dbpass = "test2";
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or...
|
by: vozzek |
last post by:
Hi all,
I've got a mySQL database I've been working with as my localhost for several months now, no connection problems. I'm at the point however, where I need to connect to the database from another site / different IP address.
I'm playing around in the PayPal sandbox, and I'm running an instant payment notification php script before the user exits. The included connection file looks like this:
<?php
$hostname_TFATP =...
| |
by: sbettadpur |
last post by:
hello
I am getting following error while connecting to mysql through php
Warning: mysql_connect() : Access denied for user: 'pds@localhost' (Using password: YES)
Actually I hosted one website on linux server, there i uploaded php script to the server, in that script i am trying to connect to the mysql, but i am getting above said problem i.e access denied for this user.
I given all privileges to 'pds' user like "SELECT, INSERT...
|
by: lisles |
last post by:
i have a page funtion.php which hs the function to connect to the db
/* Mysql Connection */
function connect(){
global $db_server,$db_user,$db_pass,$db;//Global Values from the config.php
$conn = @mysql_connect($db_server,$db_user,$db_pass) or die("Connection to Database Server Failed");
@mysql_select_db($db) or die("Database Selection Failed");
return $conn;
}
|
by: Joel Phelan |
last post by:
I am getting the below error when attempting to run a php script on my server which accesses a mysql table I have created in an existing database. I can connect to the database table via the MySQL workbench, but not via a php script I have written. This database was originally created for use with Magento Cart, which I have installed and which works correctly (can access it's database tables). I simply cannot access the database with a...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |