


Creating a user in PHPMyAdmin is just visually creating an actual user account in the database. However, up to this point, we’ve been dealing with actual database stuff. PHP has APIs that can connect and interact with the database, that much is true. Lastly, PHP doesn’t really have much to do with this at all. The point here is, your host has to actually be running a database server for it to connect properly. Honestly, it could be if SitePoint’s main domain is pointing to a database. Host names like localhost are just human friendly host names that you and I can read. As you’ve noticed, you can also specify IP addresses for your host. The address 127.0.0.1 is just the address for localhost. This can be the wild card ( %) you’ve mentioned as well. Notice the That’s where you can specify the host you’re using. Create a new user under the host of “localhost”ĬREATE USER IDENTIFIED BY 'user_password'
#Php my admin login password#
If we were to do this in command line it would be something like // Logging into mysql using an account and supplying a password I’ve tried looking through them once and I think they’re encoded.įor the user portion that you’re confused with, that’s actually all visual stuff. These files can only be read by the server if I understand correctly. The database itself is a collection of files that are then stored onto the host device. PHPMyAdmin is a tool written using PHP that helps you connect and visualize how the database looks like.

I am completely confused about the correct way to define users, privileges and connecting to server or database.Ĭan anybody throw some light on this for me - thanks guys This will prevent other users from connecting if the host part of their account allows a connection from any (%) host’ I also have a warning ‘A user account allowing any user from localhost to connect is present. I am now completely confused about server logins and database logins and also the fact that some users in the PHPMyadmin user section have multiple entries with hosts localhost, 127.0.0.1 and % It seems when I do this a user is also created in the PHPMyAdmin users section. On further investigation I see that PHPMyadmin has user accounts and databases have privileges where I have always created users for my databases. I thought all four parameters database name, host, user name and password were specific to the database. I have always used a connection script that defines database name, host, user name and password but various resources suggest you connect to the server first defining only host, user name and password. I thought I understood the basics of PHPMyadmin, MySQL, PHP and databases and have been using them for a long while but I realise I don’t understand as much as I thought.
