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
Solved

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

Posted on 2013-11-21
2
356 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 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