My last try:
I edited "config.inc.php" to give it a password
This is a misunderstanding.
NOTHING you enter into a configuration file will
change the password. They are all passive files that supply the correct credentials to the MySQL database, in order that the programs they are associated with programs can work.
the password is STORED IN THE MYSQL DATABASE ITSELF.
SO - Only an SQL directive/statement can change it.
That can come from:
A command line directive/statement (like I suggested), or by using a programmatic tool - like phpMyAdmin. Webmin, or the XAMPP Security Page because
they all forms that will generate SQL statements that will update the database. (read the PHP code in the pages).
So -- Change the password, then update configuration files.
BTW - changing the 'root' password in config.inc.php ONLY really allows phpMyAdmin to work without prompting for a password. It doesn't do anything for programs like WordPress or Joomla or your own programs if you choose to write them. I don't know what you want to use MySQL for, but if you don't understand the abstraction of data from code -- you will never understand how things work.
Maybe if we knew what you were trying to use MySQL to support, we could better explain things.
Good Luck
OSF