Forum Moderators: coopster

Message Too Old, No Replies

Phpmyadmin (How to create logins)

         

chopin2256

9:53 pm on Jul 9, 2005 (gmt 0)

10+ Year Member



I created a new user to my database using cpanel which was really easy. But how does that user login to phpmyadmin on my server? I don't see an easy way to do this through cpanel, and I can't find what link it would be.

ergophobe

10:07 pm on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I don't use phpMyAdmin much, but I think (note the disclaimer) you would need to create a new instance with that user being the registered user in some sort of config file.

PhpMyAdmin is really an admin tool, as the name suggests, not a DB interface per se, so usually it is set up with full privileges on all your DBs (or as root if you are the only one on a given server).

henry0

11:19 pm on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Open it and look at the "welcome page"
If you have enough clearance you should see:
a list where the 5th check box reads: Privileges
From there you can create users, PW etc...
BE VERY CAREFUL, a wrong info or a wrong move and you lock yourself out of your DB :)
Be sure first before adding or modify anything that you have given yourself the max privileges.

If you do not run your own server I doubt that you will have access to those options

chopin2256

4:45 am on Jul 10, 2005 (gmt 0)

10+ Year Member



Thanks...I see what you are talking about, but where does the user that I create login now?

dreamcatcher

9:16 am on Jul 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you go to your MySQL Databases page there should be a link to PHPMyADMIN at the bottom on that page. Bookmark that link. If you close and re-open the browser then click on this link it should envoke your authentication password box. Try entering your details of your new user here to see of they can log in.

I`m not really 100% sure if you can actually assign different logins to different people though. It may only be for the webmaster to access.

Let us know how you go.

dc

henry0

11:12 am on Jul 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also why not using a PHP script or a command line
and:
mysql>GRANT ALL PRIVILEGES ON database_name.
TO your_user@localhost IDENTIFIED BY 'any_password';

you can even identify only a table:
mysql>GRANT ALL PRIVILEGES ON database_name.table_name
TO your_user@localhost IDENTIFIED BY 'any_password';

Not happy with the user!
mysql>REVOKE ALL PRIVILEGES ON *.* FROM your_user;

chopin2256

5:29 pm on Jul 10, 2005 (gmt 0)

10+ Year Member



Thanks. So the new user is created with a username and password. That works fine. Like, I was able to transfer a forum with an old users name and password. However, I still am having a problem with the "log in" part to phpmyadmin. I bookmarked the phpmyadmin page, and it asked for login information, but it would only login if I put in my main account login information.

I'm also not sure where to put that code that you provided, but I did grant a new user with all privileges using cpanel. I just dont see the point in this becuase I don't see where to actually login.

henry0

6:01 pm on Jul 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



chopin2256
I am afraid that I do not waltz to the same bit!

What are you trying to achieve?
Giving full access to managing you database to a new admin
Or granting for example mod privileges to a forum user?

As far as PHPmyAdmin login is concerned you are probably not asked to log because you are recognized as the empowered admin
Or you did not set an admin PW which is ok if you are testing localhost on your local machine but VERY dangerous on a production server.

chopin2256

6:28 pm on Jul 10, 2005 (gmt 0)

10+ Year Member



What are you trying to achieve?
Giving full access to managing you database to a new admin Or granting for example mod privileges to a forum user?

The first one.

I created a user and login with all privileges to just "one" database only, out of the 3 or 4 that I have. So, where is the login box for that user to log into the standalone phpmyadmin and only see the one database in phpmyadmin, not the 3 or 4 that I have or will have?

I never cared about this before, but I have someone willing to help me keep up with the forum and sql data, and I only want him to see the forum database, not all my other databases in phpmyadmin.

dreamcatcher

7:10 pm on Jul 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I`m pretty sure you can`t do what you want. You can assign a user to a database and give them privileges, but Cpanel doesn`t support multiple users for PHPMyADMIN. At least I don`t think it does. Have you contacted your hosting company about it?

henry0

7:44 pm on Jul 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Go to your DB via PHPmyAdmin
click SQL
paste in and submit:
<<<
GRANT ALL PRIVILEGES ON database_name.
TO your_user@localhost IDENTIFIED BY 'any_password';
>>>
that should do it.