PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, January 20, 2022

[FIXED] php/mySQL on XAMPP: password for phpMyAdmin and mysql_connect different?

 January 20, 2022     mysql, php, phpmyadmin, sql, xampp     No comments   

Issue

I am running phpMyAdmin and MySQL on XAMPP for Windows.

I am accessing the MySQL database in two ways. First, via localhost/phpmyadmin, and second, via a connection.php file (with mysql_connect('localhost','user','password') which is used by other php files for a website on the server.

Both for the phpMyAdmin login and the mysql_connect I am using the root user. I know I should not be using root and that it is a security issue. But the passwords differ! I have set the password for the phpMyAdmin access via localhost/security, but I can't figure how to change the password required for the mysql_connect.

I thought it would be the same but apparently it is not. How do I change the root password through phpMyAdmin?


Solution

if you open localhost/phpmyadmin you will find a tab called "User accounts". There you can define all your users that can access the mysql database, set their rights and even limit from where they can connect.



Answered By - Zim84
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing