Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

why the machine name is appended with db user is mysql?

Posted on 2013-11-21
2
Medium Priority
?
360 Views
Last Modified: 2013-11-22
Hi,

I have created a database in mysql with user id "root" and pwd "xxx".

Now when the user from different machine access the database it gives error say
"root@machinename" does not exists.

every time i need to create user "root@machinename" and grant privileges to that then only db accessed.

why the machine name is appended with db user is mysql?
0
Comment
Question by:Rocking
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 14

Assisted Solution

by:jb1dev
jb1dev earned 2000 total points
ID: 39667978
When creating users, you need to grant them access:

http://dev.mysql.com/doc/refman/5.5/en/adding-users.html

E.g.
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'

Open in new window


You can use the wildcare '%' for all hosts.

E.g.
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
0
 
LVL 14

Accepted Solution

by:
jb1dev earned 2000 total points
ID: 39667983
From the link I posted above

mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
    ->     WITH GRANT OPTION;

Open in new window



The 'monty'@'%' account uses the '%' wildcard for the host part, so it can be used to connect from any host.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question