473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Access denied for user 'www-data'@'localhost' (using password: NO)

14
Expand|Select|Wrap|Line Numbers
  1. $hostname='localhost';
  2. $dbuser='root';
  3. $dbpass='mysql_root';
  4. $dbname='GlobalDx';
  5.  
  6. $db = mysql_connect("$hostname","$dbuser","$dbpass","$dbname") or die("Error connecting to db");
  7.       mysql_select_db("$dbname",$db) or die(mysql_error());
  8. echo $db;
  9.  
  10.  
  11.  
  12.  
Dec 7 '10 #1
1 4801
Please refer the mysql_connect functions syntax and then try it.

see the below for information.

Expand|Select|Wrap|Line Numbers
  1. $link = mysql_connect($server, $username, $password) or die('Unable to connect');
  2.  
  3. if ($link) mysql_select_db($database);
  4.  
Dec 7 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bruno | last post by:
NEWBIE I have make a mistake using mysqlcc; now, user (mysql,root,bruno) can't acces to databases. I use both mysqlcc & phpMyAdmin but the answer is access denied root@192.168.1.102 (Using...
3
by: dstewart | last post by:
Situation: One common MySQL database server on SuSE 9.1 with all updates. Uses 'rinetd'. Has entries for the appropriate IP addresses of all servers. NOTE: If the appropirate entries are NOT in...
7
by: Charts | last post by:
I login as administrator of the machine. However running the following code get access denied exception for file inside the directory. The source code: DirectoryInfo target = new...
0
by: | last post by:
I get Access Denied (System.Runtime.InteropServices.COMException) When trying to use DirectoryEntry on IIS via ASP.NET application. The same code I use is not generating this Exception while...
1
by: Saifee | last post by:
hi, I am using Microsft Outlook library in aspx.vb page, but when i run the function i get error of access denied and some user accounts. Please help!!!!!!!!! rgds, Saifee.
2
by: Shailesh Gajare | last post by:
Hi All, I have creating an ASP.Net application with two web servers. I am uploading a file which is being uploaded on one of the server, I want to copy the uploaded file on the other server at the...
1
by: neelima | last post by:
Hi All, I am trying to build a webservice which would create a powerpoint presentation and save it to the file system. I am using the Powerpoint COM object for this purpose. The standalone...
7
by: rajbala.3399 | last post by:
Hi , I want to download sql in my linux system........... # rpm -ivh MySQL-server-5.0.24a-0.glibc23.i386.rpm MySQL-cl ient-5.0.24a-0.glibc23.i386.rpm Preparing... ...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
1
by: whitey | last post by:
hi all, is there any other reason for this message to be displayed? other than incorrect username, password, database name?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.