another problem, now in mysql
Posted by: abyss_insanity (---.69.88.117.pldt.net)
Date: November 08, 2007 01:46AM

hi there... im having another problem, i found a testpage in the internet and try it, it's a testpage for mysql, testing it if it really works. here it is..

<?PHP
//remember to change the password to whatever you set
//it to in mysql instance configuration

//first parameter is server name, 2nd username 'root', 3rd is password
$rst = @mysql_connect("localhost","root","root"winking smiley;

if (!$rst){
echo( "<p>Unable to connect to database manager.</p>"winking smiley;
die('Could not connect: ' . mysql_error());
exit();
} else {
echo("<p>Successfully Connected to MySQL Database Manager!</p>"winking smiley;
}

if (! @mysql_select_db("mysql"winking smiley ){
echo( "<p>Unable to connect database...</p>"winking smiley;
exit();
} else {
echo("<p>Successfully Connected to Database 'MYSQL'!</p>"winking smiley;
}
?>

but unfortunately when i run it into the localhost i didn't get a good sign, what i get is a can't connect message, what it says is like this...

"Unable to connect to database manager.
Could not connect: Access denied for user 'root'@'localhost' (using password: YES)"

as far as i can remember i didn't put any password yet.. so please can anyone tell me what i need to do. and i hope someone will give me an easy advice because honestly i'm just starting and still very not familiar with this... thanks!!!

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: yfastud (---.cable.mindspring.com)
Date: November 08, 2007 02:26AM

Check Setup Password section on my site

Have fun,

[test.jlbn.net] (Sample Testing Codes for PHP, MySQL, ASP.net, SQL, JSP)
[www.jlbn.net] (Basic Guide for WAMP & Add-ons)

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: abyss_insanity (---.69.88.117.pldt.net)
Date: November 08, 2007 03:11AM

hi there.. i just finish to follow you're instructions at you're site i put a password using the console and also edited the config.inc. and put the same password and then i restart the computer but still i can't see the page, did i miss something?

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: yfastud (---.cable.mindspring.com)
Date: November 08, 2007 03:52AM

Can you get into phpmyadmin?

Have fun,

[test.jlbn.net] (Sample Testing Codes for PHP, MySQL, ASP.net, SQL, JSP)
[www.jlbn.net] (Basic Guide for WAMP & Add-ons)

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: abyss_insanity (---.69.88.117.pldt.net)
Date: November 08, 2007 07:09AM

yes i can... what do i need to do? is there any other way to know if the php is really connected to the database?

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: yfastud (72.236.169.---)
Date: November 08, 2007 01:34PM

When you can get into phpmyadmin means your apache, php and mysql all are working since phpmyadmin are php codes, and it can only run when parsed by apache, and only shows if it's connected to mysql

So if you save the codes above as testmysql.php in c:/wamp/www/testfolder, then access as follows:

[localhost]

Make sure to put in the codes the correct password that you created when follows instructions on my sites

Have fun,

[test.jlbn.net] (Sample Testing Codes for PHP, MySQL, ASP.net, SQL, JSP)
[www.jlbn.net] (Basic Guide for WAMP & Add-ons)

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: abyss_insanity (---.69.88.117.pldt.net)
Date: November 10, 2007 03:11AM

i didn't put that testpage in any test folder, i put that directly to the www, so when i want to access the page i type, [localhost]. is that ok? and please be more specific on how or where im going to put the right password that you're saying... i'm sorry if this is already to much but please help me understand this.

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: yfastud (---.mia.bellsouth.net)
Date: November 10, 2007 05:19AM

Quote

i didn't put that testpage in any test folder, i put that directly to the www, so when i want to access the page i type, [localhost]. is that ok?
Yep, it should work

Quote

please be more specific on how or where im going to put the right password that you're saying
Quote

//first parameter is server name, 2nd username 'root', 3rd is password
$rst = @mysql_connect("localhost","root","root"winking smiley;
Exactly as it says:
$rst = @mysql_connect("localhost","user_name","user_password"winking smiley;

Have fun,

[test.jlbn.net] (Sample Testing Codes for PHP, MySQL, ASP.net, SQL, JSP)
[www.jlbn.net] (Basic Guide for WAMP & Add-ons)

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: digitalencryptor (208.235.226.---)
Date: November 10, 2007 02:19PM

my concern is the same but the nature is different...

how would i be able to use the "ip address" of the computer where i installed wamp instead of "localhost" and in the phpmyadmin? say server: root@192.168.0.1 instead of server: root@localhost

please, i need your idea about this...thanx!!!

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: yfastud (---.mia.bellsouth.net)
Date: November 10, 2007 05:55PM

Think outside of the box is good, but might not good no more when it's too far from the box.
If you check my test site, you can run the test codes no matter where you are, and when you check the codes, they are still "localhost" ;-) Spend a little more time to think about it, you will find it's not that hard to figure out how it works ;-)

Have fun,

[test.jlbn.net] (Sample Testing Codes for PHP, MySQL, ASP.net, SQL, JSP)
[www.jlbn.net] (Basic Guide for WAMP & Add-ons)

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: abyss_insanity (---.69.88.117.pldt.net)
Date: November 13, 2007 01:34AM

hi there.. just want to say many thanks to you jlbn, now i get it.....
you're really a guardian angel for us beginners because were learning a lot from you're replies. thanks again!

Options: ReplyQuote
Re: another problem, now in mysql
Posted by: yfastud (---.cable.mindspring.com)
Date: November 13, 2007 04:46AM

You're welcome anytime ;-)

Have fun,

[test.jlbn.net] (Sample Test Codes for PHP, MySQL, SQLite, ASP.net, SQL, JSP)
[www.jlbn.net] (Basic Guide for WAMP & Add-ons)

Options: ReplyQuote


Sorry, only registered users may post in this forum.