Freeradius connection MySQL Database slow

Source: Internet
Author: User
Tags mysql client freeradius

"Environment description"

Server version redHat5.3

MySQL version MySQL5.6.22

Freeradius version 2.1.12

"Problem description"

After configuring the database address in the Freeradius sql.conf, and after logging in the user name and password, use "Radiusd-x" debug mode to start RADIUS, the console has been trying to connect the MySQL log in a lengthy output as follows:

2014-12-30 09:27:39 DEBUG sql.c-[Rlm_sql] starting 0
2014-12-30 09:27:39 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #0
2014-12-30 09:27:39 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #0
2014-12-30 09:27:56 INFO sql.c-[rlm_sql] Connected new DB handle, #0
2014-12-30 09:27:56 DEBUG sql.c-[Rlm_sql] starting 1
2014-12-30 09:27:56 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #1
2014-12-30 09:27:56 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #1
2014-12-30 09:28:12 INFO sql.c-[rlm_sql] Connected new DB handle, #1
2014-12-30 09:28:12 DEBUG sql.c-[Rlm_sql] Starting 2
2014-12-30 09:28:12 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #2
2014-12-30 09:28:12 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #2
2014-12-30 09:28:28 INFO sql.c-[rlm_sql] Connected new DB handle, #2
2014-12-30 09:28:28 DEBUG sql.c-[Rlm_sql] Starting 3
2014-12-30 09:28:28 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #3
2014-12-30 09:28:28 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #3
2014-12-30 09:28:44 INFO sql.c-[rlm_sql] Connected new DB handle, #3
2014-12-30 09:28:44 DEBUG sql.c-[Rlm_sql] Starting 4
2014-12-30 09:28:44 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #4
2014-12-30 09:28:44 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #4
2014-12-30 09:29:00 INFO sql.c-[rlm_sql] Connected new DB handle, #4
2014-12-30 09:29:00 DEBUG sql.c-[Rlm_sql] Starting 5
2014-12-30 09:29:00 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #5
2014-12-30 09:29:00 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #5
2014-12-30 09:29:17 INFO sql.c-[rlm_sql] Connected new DB handle, #5
2014-12-30 09:29:17 DEBUG sql.c-[Rlm_sql] Starting 6
2014-12-30 09:29:17 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #6
2014-12-30 09:29:17 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #6
2014-12-30 09:29:32 INFO sql.c-[rlm_sql] Connected new DB handle, #6
2014-12-30 09:29:32 DEBUG sql.c-[Rlm_sql] Starting 7
2014-12-30 09:29:32 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #7
2014-12-30 09:29:32 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #7
2014-12-30 09:29:48 INFO sql.c-[rlm_sql] Connected new DB handle, #7
2014-12-30 09:29:48 DEBUG sql.c-[Rlm_sql] Starting 8
2014-12-30 09:29:48 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #8
2014-12-30 09:29:48 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #8
2014-12-30 09:30:04 INFO sql.c-[rlm_sql] Connected new DB handle, #8
2014-12-30 09:30:04 DEBUG sql.c-[Rlm_sql] Starting 9
2014-12-30 09:30:04 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #9
2014-12-30 09:30:04 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #9
2014-12-30 09:30:21 INFO sql.c-[rlm_sql] Connected new DB handle, #9
2014-12-30 09:30:21 DEBUG sql.c-[Rlm_sql] starting 10
2014-12-30 09:30:21 INFO sql.c-[Rlm_sql] attempting to connect Rlm_sql_mysql #10
2014-12-30 09:30:21 INFO sql_mysql.c-[Rlm_sql_mysql] starting connect to MySQL server for #10
2014-12-30 09:30:37 INFO sql.c-[rlm_sql] Connected new DB handle, #10

After 99, the prompt fails, after consulting the relevant information, the following treatment is to solve the problem

"Solution"

Principle: Turn off the domain name resolution for MySQL server connection

Steps:

1 vim/usr/my.cnf; mysql5.6.22 version of the configuration file under/usr/, edit my.cnf, under [mysqld] Add a line "Skip-name-resovle", save exit;

2 restart MySQL;

3 restart RADIUS;

"There may be a problem."

When the MySQL client connects to the server, the server will reverse the domain name resolution for the client, so this is a time-consuming reason, and after canceling the domain name resolution, the MySQL Permissions table (user table) will no longer be able to use host names such as localhost, but must use an IP address.

----< for reference >----only

Freeradius connection MySQL Database slow

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.