Solved

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

Posted on 2007-04-06
6
993 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

821 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