0

I am new to the php server side and with mysql.With having some basic knowledge about that all.Recently install wamp server and some php file and database creation i m trying to connect my android app to the localhost running mysql database (as you might be knowing like some webservice).

So in the browser i typed http://localhost in the url address space and its shows the wampserver home page

but when i typed http://localhost/phpmyadmin its shows some error page I am attaching the screenshot for the error page

Here is the screen

phpmyadmin showing error page

So anybody can tell me what should I do in order to get the correct phpmyadmin page. If more info require in this part pls let me know

blackjack
  • 586
  • 2
  • 11
  • 30
  • maybe this answer will help [link](http://stackoverflow.com/questions/11482970/1045-access-denied-for-user-rootlocalhost-using-password-no) – Babidi Jun 11 '14 at 11:15

6 Answers6

1

First stop Mysql:

Sudo / etc / init.d / mysql stop

Then open the configuration file php5 and look for the line that enables entry into Safe Mode:

Vim / etc/php5/apache2/php.ini

Within vim enter the functions mode / safe (to locate the line) and change it to On

safe_mode = Onn

Exit VIM editor and save the changes:

Restart the MySQL mode security (safe_mod):

Safe_mysqld-skip-grant-tables &

With MySQL in safe mode select the mysql table and then change the root password and grant all privileges and exit MySQL with the EXIT command.

Mysql> USE mysql

mysql> UPDATE user SET password = password ("new_password") WHERE user = "root";

Result: Query OK, 1 row affected (0.00 sec) Rows matched: 3 Changed: 1 Warnings: 0

mysql> flush privileges;

Result: Query OK, 0 rows affected (0.00 sec)

mysql> exit

Now the Linux Shell kill all mysql processes

Killall mysqld mysql

Mysql restart normally.

/ etc / init.d / mysql start

To test access MySQL from the terminal and the browser through PhpMyAdmin Terminal:

mysql-u root-p

http://localhost/phpmyadmin

Enter username and password for root.

Srini
  • 41
  • 1
  • 9
0
  1. Make sure you started Your server
  2. go to server and start it
  3. then enter localhost/phpmyadmin
  4. find your database then select you database
user229044
  • 232,980
  • 40
  • 330
  • 338
Irfan Ali
  • 189
  • 1
  • 9
0

You have to allow localhost access to your mysql server. And its basicly the same question as https://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost

Community
  • 1
  • 1
robinp7720
  • 443
  • 4
  • 12
0

You will need to reset the password.

First start the mysql server instance or daemon with the --skip-grant-tables option. (security setting)

Then Execute these statements.

# mysql -u root mysql 
mysql> UPDATE user SET Password=PASSWORD('your_new_password') where USER='root'; 
mysql> FLUSH PRIVILEGES; 

Finally, restart the instance/daemon without the --skip-grant-tables option.

You should be able to connect with your new password.

# mysql -u root -p 
Enter password: your_new_password 
Ezhil
  • 996
  • 8
  • 13
0

You'll have to change the password of the user root and then modify the file config.inc.php.

0

Make sure that you installed the wamp server directly onto your (C:) drive and not into program files -

Secondly, you need to actually run the server to access localhost - you can do this by opening up the control panel for the server and starting the APACHE and MYSQL services.

Sam
  • 490
  • 1
  • 5
  • 22