Pages: [1]   Go Down
Send this topic | Print
Author Topic: (wanted) help: mysql_connect()  (Read 463 times)
india543
Member
*
Offline Offline

Posts: 6


WWW
« on: October 04, 2009, 01:03:02 PM »

I do not seem to get  past this error no mayyer what i do. help will be appreicated.

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'india543_admin'@'localhost' (using password: YES) in /www/110mb.com/i/n/d/i/a/5/4/3/india543/htdocs/db/createtablecontact.php on line 8 Could not connect: Access denied for user 'india543_admin'@'localhost' (using password: YES)

my code:

 

<html dir="ltr">
    <head>
        <title></title>
        <?
$user="india543_admin";
$password="";
$database="india543_info";
$con = mysql_connect("localhost","india543_admin","");

if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// some code
echo "begin select";
@mysql_select_db($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(20) 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($query);
mysql_close();
?>
    </head>
    <body>
    </body>
</html>
« Last Edit: October 04, 2009, 01:07:03 PM by india543 » Logged
Zzbomb
Advanced Authority Member
*****
Offline Offline

Posts: 1289


WWW
« Reply #1 on: October 07, 2009, 06:32:27 AM »

The first thing i see wrong is there is no password? but your probly just omiting that,

Make sure you have MySql, this is a separate service at 110mb that you have to pay a onetime fee for.

Did you give permissions to the mysql user to be able to access the database?

Also, this is in the wrong forum section, this should be in technical questions?
Logged

Piotr GRD
Honoured 110MB Member
Official 110mb Guru
*****
Offline Offline

Posts: 6664



WWW
« Reply #2 on: October 08, 2009, 06:56:40 PM »

AND read my reply in this topic:
http://www.110mb.com/forum/mysqlconnect-error-phpini-t50430.0.html

But most of all - make sure that you assign the privileges while creating database and database user and that you use the valid login details.


I think that you've lost the previous existing topics.
Tip: next time when you'll lost your topics go to "profile" and then at the bottom "show the last posts of this person" OR at the top of every page below "Hello india543" click on "show new replies to your posts".


« Last Edit: October 08, 2009, 07:01:20 PM by Piotr GRD » Logged

Pages: [1]   Go Up
Send this topic | Print
Jump to: