Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:47:45+00:00 2026-06-07T02:47:45+00:00

Does a MySQL User needs to be added to MySQL system? I am learning

  • 0

Does a MySQL User needs to be added to MySQL “system”?

I am learning MySQL basics but this question just popped out. Here is why:

:~$ mysql -u johndoe
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 50
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.   

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SELECT User();
+-------------------+
| User()            |
+-------------------+
| johndoe@localhost |
+-------------------+
1 row in set (0.00 sec)

mysql> quit
Bye

of course I didn’t set up a user named johndoe, but it seems that I am able to enter mysql with any username. I’m not saying I’ll see any database at all, as it may not have been set any databases where johndoe, for example, could do something.

So my question finally is: Is this true or I am seen it the wrong way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:47:47+00:00Added an answer on June 7, 2026 at 2:47 am

    actually, MySQL connected you as an anonymous user (”@localhost) because the user “johndoe@localhost” does not exist. run “SELECT CURRENT_USER()” and you’l see what I mean, also, if you check the user table in the mysql database you’l find a row where host=’localhost’ and user=”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does MySQL come with a built-in automatic failover? Or, are there load-balancers out there
I'm looking for a eCommerce system built using PHP and MySQL. It needs to:
Does MySQL support MSDTC?
Does mysql provide a mechanism for storing and retrieving encrypted data? I don't mean
Does MySQL treat the default character setting in a cascading type of way? For
Does MySQL regard brackets in the WHERE conditions at all? Does it work like
What does MYSQL mean in the following code. require_once (MYSQL);
So I asked does https://stackoverflow.com/questions/11144014/does-mysql-update-add-a-row-if-it-doesnt-exist and I was told that I'm using columns incorrectly.
Why does the MySQL year type limit the range of allowable years between 1901
Why does the MySQL query below give error 1066 (Not unique table/alias: 'customer') ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.