Solved

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

Posted on 2013-11-21
2
352 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
  • 2
2 Comments
 
LVL 14

Assisted Solution

by:jb1dev
jb1dev earned 500 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 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now