| | |
How to access new user Accounts, it always logs into my Root
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2009
Posts: 13
Reputation:
Solved Threads: 0
Hello,
The problem is I have made a second user account for my databases, every time I open the MySql monitor it doesn't prompt me for a username, it just assumes I want to log into the Root and asks for my Root password. It doesnt ask for a username or which username I want to log in under.
I assumed that when I opened the mysql monitor it should prompt me to enter something like:
but it just goes directly to my root, no username questions.
This is just a localhost install of mysql on my PC.
Thanks for any help.
Andrew
The problem is I have made a second user account for my databases, every time I open the MySql monitor it doesn't prompt me for a username, it just assumes I want to log into the Root and asks for my Root password. It doesnt ask for a username or which username I want to log in under.
I assumed that when I opened the mysql monitor it should prompt me to enter something like:
MySQL Syntax (Toggle Plain Text)
mysql -u username -p
but it just goes directly to my root, no username questions.
This is just a localhost install of mysql on my PC.
Thanks for any help.
Andrew
How do you enter the MySQL shell/monitor ?
If you type just mysql and fire the command it will assume the default settings in the my.cnf (GNU Linux)/ my.ini (Windows) configuration file.
If there's something different that you are doing then specify it.
If you type just mysql and fire the command it will assume the default settings in the my.cnf (GNU Linux)/ my.ini (Windows) configuration file.
If there's something different that you are doing then specify it.
Get up every morning and take a look at the Forbes' list of richest people. If your name doesn't appear.... GET TO WORK !!!
•
•
Join Date: Mar 2009
Posts: 13
Reputation:
Solved Threads: 0
Hi verruckt24,
Thanks for trying to help. I must not have explained properly.
I was setting up user names and passwords for the MySQL database to give those usernames certain access to parts of the database.
I'm trying to figure out how to login to those new usernames. Because when I open the mysql monitor it goes right to the Root user, it doesnt ask me to sign in, it only prompts me for the Root password. It should be asking which username wants to log in.
Is that clearer? Thanks for your help.
Andrew
Thanks for trying to help. I must not have explained properly.
I was setting up user names and passwords for the MySQL database to give those usernames certain access to parts of the database.
I'm trying to figure out how to login to those new usernames. Because when I open the mysql monitor it goes right to the Root user, it doesnt ask me to sign in, it only prompts me for the Root password. It should be asking which username wants to log in.
Is that clearer? Thanks for your help.
Andrew
MySQL monitor - this is the command shell of MySQL that you are talking about isn't it ? Just to make sure we are on the same wavelength here.
Also have you already created the users or are you in the process of creating them.
Third, what command do you use to login ?
The actual procedure should be something like:
1. Login using the root user
2. Create users with 'Create user...' or 'Grant'
3. Logout of the shell.
4. Try to login with the given username/password.
Also have you already created the users or are you in the process of creating them.
Third, what command do you use to login ?
The actual procedure should be something like:
1. Login using the root user
2. Create users with 'Create user...' or 'Grant'
3. Logout of the shell.
4. Try to login with the given username/password.
Get up every morning and take a look at the Forbes' list of richest people. If your name doesn't appear.... GET TO WORK !!!
•
•
Join Date: Mar 2009
Posts: 13
Reputation:
Solved Threads: 0
Yes, the MySQL monitor is what I'm talking about.
Yes, I have created the user already and gave that user account privileges to a certain database.
For the third question you asked about how I login: I just open the MySQL monitor and it instantly prompts me for the root password. I enter it and I'm in.
Your procedure that you gave was very helpful. So I guess I understand my problem now of why it's not prompting a user name first.
No matter what I have to give that user access to the Root password? and then that user has to log in to his user name right?
I thought the point of creating user accounts was so that they can't access everything in the root, I only want them to be accessing what I give them privileges too. By giving them the root password so they can log in to their user account, doesn't that give them access to everything before they log in to their user account?
This is very confusing, or I'm making harder than it is haha. Thanks for your help.
Andrew
Yes, I have created the user already and gave that user account privileges to a certain database.
For the third question you asked about how I login: I just open the MySQL monitor and it instantly prompts me for the root password. I enter it and I'm in.
Your procedure that you gave was very helpful. So I guess I understand my problem now of why it's not prompting a user name first.
No matter what I have to give that user access to the Root password? and then that user has to log in to his user name right?
I thought the point of creating user accounts was so that they can't access everything in the root, I only want them to be accessing what I give them privileges too. By giving them the root password so they can log in to their user account, doesn't that give them access to everything before they log in to their user account?
This is very confusing, or I'm making harder than it is haha. Thanks for your help.
Andrew
Same passwords would not cause the root privileges to be given to the user. As privileges are given to user accounts and not to passwords.
You can give the user account a password at the time of creating the user account. Read the CREATE USER syntax in MySQL documentation (MySQL Reference Manual) Or you could set the password with SET PASSWORD Read this in the documentation too. Or you could set the password with the GRANT command itself the command should be like this
Here,
database - database on which to give permission to.
tablename - tablename on which to give permission to.
user - username
host - machine (localhost, domain-name or IP)
password - password that you want toassign to the user account.
Replace these values in the command as per your requirements. Read the GRANT command too in the docs.
•
•
•
•
2. Create users with 'Create user...' or 'Grant'
sql Syntax (Toggle Plain Text)
GRANT SELECT, UPDATE, DELETE on database.tablename to user@host IDENTIFIED BY 'password';
Here,
database - database on which to give permission to.
tablename - tablename on which to give permission to.
user - username
host - machine (localhost, domain-name or IP)
password - password that you want toassign to the user account.
Replace these values in the command as per your requirements. Read the GRANT command too in the docs.
Get up every morning and take a look at the Forbes' list of richest people. If your name doesn't appear.... GET TO WORK !!!
![]() |
Similar Threads
- popups in Firefox, IE (w/l2mfix, hjt logs) (Viruses, Spyware and other Nasties)
- I need help (Viruses, Spyware and other Nasties)
- help with reading these logs (Viruses, Spyware and other Nasties)
- Ay up DMR! Still got about:blank after doing everything! (Viruses, Spyware and other Nasties)
- Homepage has been changed to about:blank (Viruses, Spyware and other Nasties)
- I can't remove about:blank (Viruses, Spyware and other Nasties)
- Another Trojan.Bookmarker.Gen (Viruses, Spyware and other Nasties)
Other Threads in the MySQL Forum
- Previous Thread: Problem in inserting query in database
- Next Thread: timestamp
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns changingprices cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal dui ec2 email enterprise eudora facebook form foss gartner gnu government gpl greenit groupware hiring hyperic images innerjoins insert ip joebrockmeier join keyword keywords kickfire laptop law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





