Solved

Command in FreeBSD to allow client host to use root in MySQL 5 server?

Posted on 2007-04-06
6
980 Views
Last Modified: 2013-11-22
Hello,

Im new to using MySQL in freeBSD, im fairly experienced getting MySQL to work in a windows environment, but I am trying to learn FreeBSD.  I got as far as installing and running MySQL 5 server on FreeBSD 6.2 successfully. The problem is i dont know how to work my way through managing MySQL in FreeBSD. Normaly I use a client machine with windows and use MySQL GUI tools like MySQL Administrator. But i can becuase i get denied becuase my client machine (192.168.2.6) isnt allowed to.

So with that said, how do i add host 192.168.2.6 to get full access using root, using FreeBSD's localhost?

Thanks to all who help.
0
Comment
Question by:FatherOwnage
  • 2
6 Comments
 
LVL 30

Accepted Solution

by:
todd_farmer earned 250 total points
ID: 18869560
Connect to the server from the FreeBSD host using the command-line interface (as root) and issue:

UPDATE mysql.user SET host = '%' WHERE user = 'root';
FLUSH PRIVILEGES;
0
 

Author Comment

by:FatherOwnage
ID: 18869622
thats the first part i dont know how to do, using the host (FreeBSD) to get into my sql to run that command.

Im logged in as root, and when i run that line it gives me this in return:

# UPDATE mysql.user SET host = '%' WHERE user = 'root' ; FLUSH PRIVILEGES ;
UPDATE: Command not found.
FLUSH: Command not found.


Thanks for the help so far!
0
 
LVL 15

Expert Comment

by:mr_egyptian
ID: 18873179
Here is the relevant section of the documentation:

http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

Please also note the link at the beginning, entitled “Unix Post-Installation Procedures”:

http://dev.mysql.com/doc/refman/5.0/en/unix-post-installation.html
0
 
LVL 15

Assisted Solution

by:mr_egyptian
mr_egyptian earned 250 total points
ID: 18873188
You're just at a shell (bash?).  You need to use the mysql client to connect to the db server:

# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is ....


If you've already set a password, you'll need:

# mysql -u root -p
Enter password:
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

706 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

18 Experts available now in Live!

Get 1:1 Help Now