introduction screenshots faq forum blog modules components download
Please use the search function and/or read the FAQ first.
-->

Conect to MYSQL



Posted by: bmeighani
June 09, 2009 10:06PM
Hi All,

I have EasyPHP and MYSQL is running on it. I want to connect to MYSQL and use: “Localhost”, “root” , “”
Like below:
<html>
<head>
<title>Test MySQL1</title>
<body>

<?php
$host="localhost";
$user="root";
$pass="";
mysql_connect($host,$user,$pass);
….
but system sends a warning message like below:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘root’@’localhost’ (using passwod:NO) in C:\Program Files\EasyPHP 3.0\www\SQLTest|Index.php on line 10
Do you have any idea?
Thanks
Posted by: Amour
June 10, 2009 12:21AM
With EasyPHP 3.0, MySQL password is "mysql" (I think)
Posted by: bmeighani
June 10, 2009 04:42AM
Thanks
It works.
but now there is another problem.
I worked with PHPMYADMIn MySql manager and I changed a parameter to not get a password and I saved it but when I run "MySql manager" from [127.0.0.1]
a message said that
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Posted by: Amour
June 10, 2009 12:27PM
Now, you can change password into config.inc.php of phpMyAdmin
Posted by: djachka
June 21, 2009 04:33PM
It happend exactly the same to me but i can't fix it; did it work for you? or is it necessary to modify the config of mysql too or something else?
Thanks
Posted by: Amour
June 21, 2009 10:20PM
If you changed root password into MySQL, phpMyAdmin don't must use password (and you'll get : (using password: NO))

But here, you get (using password: YES) so it seems phpMyAdmin try to connect with a password...
Did you tried to change any config.inc.php of phpMyAdmin to disable root password (empty) ?
Posted by: djachka
June 22, 2009 10:54AM
I still get error 1045 and password: yes
How can i set that password is no?
Posted by: Amour
June 23, 2009 07:55AM
Which file did you changed, exactly ?
Posted by: djachka
June 23, 2009 11:31AM
In other words: where are the different files where the password has to be modified?
Posted by: Amour
June 23, 2009 03:14PM
There is only config.inc.php of phpMyAdmin ;)
Posted by: djachka
June 23, 2009 04:32PM
I modify the mysql password with phpmyadmin. Then I modify in config.inc.php. But it didn't work. I suppose that something happend when modifying the password with phpmyadmin and I don't know what is the password that was actually recorded.
So, I need to know how to set a new password for mysql. I tried with Command line to open mysql but I don't get anything.
Thanks for help
Posted by: Amour
July 04, 2009 09:42AM
I installed EasyPHP to see that, and no problem...
After root password change into phpMyAdmin, I changed "EasyPHP 3.0\phpmyadmin\config.inc.php" :
$cfg['Servers'][$i]['password'] with good password.

After, phpMyAdmin worked perfectly again.