Why Freeradius and Mysql dont work?

yao guoxian yaoguoxian at gmail.com
Wed Jan 31 04:52:33 CET 2007


Yes, 202.117.7.243 is the MySQL server's IP.The problem is that I can not
login to MySQL on the command line.
The following is the input commands and output responses to them:
    input command: ./bin/mysqld_safe  --user=root
    output results:   Starting mysqld daemon with databases from
/home/ygx/mysql-standard-5.0.20-linux-i686/data
    input command:./bin/mysql -u root -p
    output results:Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
password: YES)
    input command:./bin/mysql -u root
    output results:Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.20-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
    Notice: the third input command is not with "-p".

    I have done the following steps to reset user "root"'s password:
    # killall -TERM mysqld
    #./bin/mysql_safe --skip-grant-tables&
    #./mysql -u root
    >use mysql;
    >update user set password=password('the-new-password') where
user='root';
    >flush priviliges;
    >quit;
But it didn't work. At first I could use  #./bin/mysql_safe
--skip-grant-tables&   and   #./mysql -u root  to  enter into the command
line environmeng of mysql ,
while the two commands doesn't take effect now. The response to
#./bin/mysql_safe --skip-grant-tables& is like follows:
[root at nic219 mysql-standard-5.0.20-linux-i686]# bin/mysqld_safe
--skip-grant-tables &
[1] 4542
[root at nic219 mysql-standard-5.0.20-linux-i686]# Starting mysqld daemon with
databases from /home/ygx/mysql-standard-5.0.20-linux-i686 /data
STOPPING server from pid file /home/ygx/mysql-standard-5.0.20-linux-i686
/data/nic219.pid
070129 15:40:21  mysqld ended


2007/1/30, Dennis Skinner <dskinner at bluefrog.com>:
>
> yao guoxian wrote:
> > rlm_sql_mysql: Mysql error 'Host '202.117.7.243 <http://202.117.7.243>'
> > is not allowed to connect to this MySQL server'
>
> I assume this is a test server and is tightly controlled....
>
> Login to MySQL as root on the command line.
> Type this:
>
> GRANT ALL ON *.* TO root at 202.117.7.243 IDENTIFIED BY 'mysql-root-pass';
>
> That will let you do what you are trying to do.  Then go read the MySQL
> documentation on server security.  You really should not be using the
> root account.  Create a new user for radius queries and only give it the
> access it needs.  Then REVOKE the rights I just had you GRANT above.
>
> --
> Dennis Skinner
> Systems Administrator
> BlueFrog Internet
> http://www.bluefrog.com
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20070131/d5977132/attachment.html>


More information about the Freeradius-Users mailing list