Welcome! Log In Create A New Profile

Advanced

Access denied phpMyadmin

Posted by wafefe 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Access denied phpMyadmin
April 05, 2012 11:26AM
Hi

I tried setting a password for my database in phpMyAdmin and just after making changes, i was kicked off and received the following error message :

MySQL said: 

#1045 - Access denied for user 'root'@'localhost' (using password: NO) 

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


"please help, How do i reconfigure my password? i tried the whole morning"
avatar
Mac
Re: Access denied phpMyadmin
April 05, 2012 12:39PM
No simple solution. Google for help. Or uninstall reinstall.

1. Open config.inc.php file in the phpmyadmin directory

2. Find line 21: $cfg['Servers'][$i]['password'] = ''

3. Change it to: $cfg['Servers'][$i]['password'] = 'your_password';

4. Restart XAMPP
Re: Access denied phpMyadmin
April 05, 2012 02:29PM
Thanks a lot Mac

I googled till i found a solution and again, i just open the forum to give a solution in case someone may experience the same problem and there you just gave the same solution as well "config.inc.php".

We learn a lot every day Mac
Re: Access denied phpMyadmin
April 25, 2012 03:08PM
May you show me an example of connection details, because I put the following but nothing is correct:
Language: SQL
$username = "490515"; $password = ""; $database = "490515"; $server = "localhost";   //conection details $db_handle = mysql_conect($server, $username, $password);   //DATABASE $db_found = mysql_select_db($database, $db_handle);

And in the phpMyadmin, I changed line 20 to 490515, and line 21 to password='', because I di put the password yet.
But still errors
Re: Access denied phpMyadmin
April 25, 2012 04:47PM
Dear Sir,

I have an issue of connecting to db.

Your assistance.
avatar
Mac
Re: Access denied phpMyadmin
April 26, 2012 06:32AM
Well, you are not clear if your problem is getting into phpmyadmin, or if it is giving a user access to the database you have created.

http://www.yourwebskills.com/dbphpmyadminusers.php
Re: Access denied phpMyadmin
April 26, 2012 07:29AM
Dear Sir,
Please what I did and the tables are created but no access to the database as per the following message of warning.

THis is the user.find.php code

Language: PHP
include (';user.php';); $connection = mysql_connect("localhost", "490515", ""); mysql_select_db("490515", $connection); // form echo "<form method=';post'; action=';user_find.php';>"; echo "<div>"; echo "Enter the id: <input type=';text'; name=';_id'; value=';'; />"; echo "<input type=';submit'; value=';Submit'; name=';submitID'; />"; echo"</div>"; echo "</form>"; if (isset($_POST[';submitID';])){   $ID = $_POST[';_id';]; // $user = new User(); $user->getUserById(';$ID';);   // echo "<p>User known as: ".$user->getDisplayName()."</p>";   // $friends = $user->getFriends();   // echo "<p>Friend with: ".implode(';,';,$friends)."</p>";   // $user->getUserById(';$ID';);   // echo "<p>User known as: ".$user->getDisplayName()."</p>";   echo "<p><a href=';user_find.php';>Return</a></p>";

The following is the warning:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user '490515'@'localhost' (using password: NO) in E:\xampplite\htdocs\portfolio\user_find.php on line 4

Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in E:\xampplite\htdocs\portfolio\user_find.php on line 5

I reinstalled the program and changed the password. but the issue still the same.

I can see the database created (490515) in the msql /data directory.

Your assistance.
Re: Access denied phpMyadmin
April 26, 2012 09:46AM
@CostaM

Try the following maybe:

Instead of "localhost" rather use:
Language: PHP
$hostserver = "127.0.0.1"; $db_name = "490515"; $password ="???";
and pass the variables in instead of the string with the words, and no "localhost".

And I hope you are not passing in a blank password, but just blanked it out for now, as that might also cause issues. Check that other post to change your password in the backend if need be.

And lastly try something like this:
Language: PHP
$db_handle = mysql_connect($hostserver, $db_name, $password); $db_found = mysql_select_db($db_name, $db_handle); if ($db_found) { echo "Jipeeee!!!"; } else { echo "sigh, not again"; }

I hope this helps?

---------------------------------------------------------------------
Live life...
---------------------------------------------------------------------
avatar
Mac
Re: Access denied phpMyadmin
April 26, 2012 10:07AM
Well, have you created a user for this database in phpmyadmin. Have you also visited the link I posted?

Here is another link http://www.infosolutionsgoa.com/tutor/phpmyadmin-database-management.html
Re: Access denied phpMyadmin
April 26, 2012 12:14PM
Thank you so much Sir,

I did learn something what I did not do last year on adding users for my database.
Re: Access denied phpMyadmin
April 29, 2012 11:06PM
Hi CostaM,
Did you manage to resolve your issues for the user_find code. Just wanted to know what you did. I did not have any connection to the databse issues but am also having the following errors:-
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\user.php on line 11

User known as:

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\user.php on line 25

Friend with:

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\user.php on line 11

User known as:

Plse advise, thanks
Re: Access denied phpMyadmin
April 30, 2012 07:59AM
Please see the link: Here is another link [www.infosolutionsgoa.com]
This link is to create a database and username, then give privileges to the username.
Because, when we create database on our computer with Xampp, it doesn't create username.
Create database, then username by following the link, then assign a password to user created, then no warning will be given.

I've finished my portfolio and uploaded it.

Good luck
Sorry, you do not have permission to post/reply in this forum.