Could not link driver rlm_sql_mysql

3.7k views Asked by At

I have a problem with MySQL:

freeradius -X gives the following command:

Could not link driver rlm_sql_mysql: /usr/lib/freeradius/rlm_sql_mysql.so: cannot open shared object file: No such file or directory
Make sure it (and all its dependent libraries!) are in the search path of your system's ld
/etc/freeradius/3.0/mods-enabled/sql[18]: Instantiation failed for module "sql

" admin@ubuntu-de-01:/etc/freeradius/3.0/mods-available$ freeradius -v

radiusd: FreeRADIUS Version 3.0.16, for host x86_64-pc-linux-gnu, built on Apr 17 2019 at 12:59:55
FreeRADIUS Version 3.0.16
Copyright (C) 1999-2017 The FreeRADIUS server project and contributors
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE
You may redistribute copies of FreeRADIUS under the terms of the
GNU General Public License
For more information about these matters, see the file named COPYRIGHT

The MySQL database is working:

Database changed
mysql> show tables;
+------------------+
| Tables_in_radius |
+------------------+
| nas              |
| radacct          |
| radcheck         |
| radgroupcheck    |
| radgroupreply    |
| radpostauth      |
| radreply         |
| radusergroup     |
+------------------+
8 rows in set (0.00 sec)

mysql>

I haven't tried installing libmysqlclient or yum or anything. This problem started occurring after I've reinstalled the freeradius.

Is there a requirment to reinstall the mysql DB somehow as well?

Thank you

1

There are 1 answers

0
Alexsandr Kremzuk On

in my case, after downgrading the MySQL version, the libmysqlclient-dev library was missed, all that was needed was just to install it.

apt install libmysqlclient-dev

Hope, this helps someone.