Password clarification - config.inc.php

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Password clarification - config.inc.php

Postby waveform » 18. August 2013 20:08

Hello,

I understand that the passwords are stored in the database in a user table. But when I first log into MySQL from the command line, I have not created a database at that stage, so what database am I actually logging into? All these help pages I've run across talk about logging into MySQL which makes it sound as though your logging in to the MySQL client itself but not actually logging into any specific database with that initial user and password.


One last question please.
I don't think understand the password section of the config.inc file as far as what I read in the phpmyadmin help section on passwords.

When I set my root password, It's my understanding that I had to also set it in the:
Config.inc.php file under the section titled: Authentication type and info.

But what is the function of setting the password in the config.inc.php file? If you've already set it using the command in the shell, what does the password in the config.inc.php really do?
Also, I thought the shell automatically updated the config.inc.php file if you use the security section? It did not for me.

I "did" set my root password, it works because I've tested logging in with the new password, but my config.inc.php section still has nothing between the two quotation marks in the code above: ' '
I know I can change this in notepad, but what is it doing that the shell command is not?

In a page I was reading, the author showed two different syntax commands to use, but never said why you have to use two, or what they are?
Code: Select all
    mysqladmin -u root password “newpassword”
    mysqladmin -u root -h host_name password “newpassword”
User avatar
waveform
 
Posts: 5
Joined: 18. August 2013 19:54
XAMPP Version: 5.5.19
Operating System: Win XP-win7 Debian 7.8

Re: Password clarification - config.inc.php

Postby Altrea » 18. August 2013 21:47

Hi waveform,

waveform wrote:I understand that the passwords are stored in the database in a user table. But when I first log into MySQL from the command line, I have not created a database at that stage, so what database am I actually logging into? All these help pages I've run across talk about logging into MySQL which makes it sound as though your logging in to the MySQL client itself but not actually logging into any specific database with that initial user and password.

If you don't specify a database name in your mysql cli connect command you don't connect to any database.
MySQL is a RDMS (relational database management system) so you must be able to manage/administrate databases without logging to a specific one.
A host-user-password combination can be restricted to a database, but don't have to.

waveform wrote:I don't think understand the password section of the config.inc file as far as what I read in the phpmyadmin help section on passwords.

When I set my root password, It's my understanding that I had to also set it in the:
Config.inc.php file under the section titled: Authentication type and info.

But what is the function of setting the password in the config.inc.php file? If you've already set it using the command in the shell, what does the password in the config.inc.php really do?

Also, I thought the shell automatically updated the config.inc.php file if you use the security section? It did not for me.

MySQL is completely independend from phpMyAdmin. phpMyAdmin is just a third party gui for MySQL databases.
If you change your root password there are several ways to use it in phpmyadmin. One way is to store it in the configuration file and use that to login (auth type config). Other possibilities are to show a login form (Auth type cookie or http).

waveform wrote:In a page I was reading, the author showed two different syntax commands to use, but never said why you have to use two, or what they are?
Code: Select all
    mysqladmin -u root password “newpassword”
    mysqladmin -u root -h host_name password “newpassword”

The only difference is the host parameter. So what do you think is the host parameter for?

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6544
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Password clarification - config.inc.php

Postby waveform » 25. August 2013 17:13

Hello altrea
Thank you for clarifying the config.inc file usage!

If I may just make sure I'm clear on the passwords points:
So the MySQL password is only used for accessing the database server application (MySQL) in this case?
In other words if I have a public web site, and my hosting company has MySQL implemented, the password at that stage is only to access their MySQL software? So the database files are usually never locked?
So if your DB is on a public sever with a hosting company, All the user db permissions are being applied to the hosting company's SQL software/Implementation? And not database independent?
User avatar
waveform
 
Posts: 5
Joined: 18. August 2013 19:54
XAMPP Version: 5.5.19
Operating System: Win XP-win7 Debian 7.8

Re: Password clarification - config.inc.php

Postby Altrea » 26. August 2013 08:20

Hi waveform,

waveform wrote:So the MySQL password is only used for accessing the database server application (MySQL) in this case?

The domain-username-password combination is used to authenticate against the MySQL management system.
This channel it uses can be the MySQL command line interface (CLI) or another client based program, phpmyadmin or another webapplication based GUI, or another third party client program.

waveform wrote:In other words if I have a public web site, and my hosting company has MySQL implemented, the password at that stage is only to access their MySQL software?

Not only accessing the database. A user can have for example global administrative permissions or table manipulating permissions. So a user with the specific permission can also do the specified action on the database.

waveform wrote:So the database files are usually never locked?

What does "locked" mean? Well on filesystem area this files are not protected, yes. But depending on the database engine the data found in the database files are human readable or not human readable.

waveform wrote:So if your DB is on a public sever with a hosting company, All the user db permissions are being applied to the hosting company's SQL software/Implementation? And not database independent?

All users are dependend on the specific MySQL implementation. So that are not any global users which can connect to any MySQL database on the world. Related to the specific Database Management system the user priviledges can be database independend, but don't have to.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6544
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests