> On Jul 24, 2017, at 23:00, 沧海云帆 via PacketFence-users 
> <[email protected]> wrote:
> 
> Hello,
> PF's database address is /var/lib/mysql,now I need to change it to 
> /opt/sqldata,and I change it  follow these steps:
> #cp -arp /var/lib/mysql /opt/sqldata
> change mysql script:
> #vim /etc/init.d/mysql
>  commented 
> <file:///C:/Program%20Files%20(x86)/Dict/7.1.0.0421/resultui/dict/result.html?keyword=commented>
>  out 
> <file:///C:/Program%20Files%20(x86)/Dict/7.1.0.0421/resultui/dict/result.html?keyword=out>70
>  line:# datadir=/var/lib/mysql
> add line:datadir=/opt/sqldata
> save and exit


That script is not used by PacketFence, so it's not going to do you any good.


> #vim /usr/local/pf/addons/dev-helpers/centos-chroot/my.cnf
> commented out datadir:# datadir=/var/lib/mysql
> add datadir:datadir=/opt/sqldata
> commented socket:# socket=/var/lib/mysql/mysql.sock
> add socket: socket=/opt/sqldata/mysql.sock
> save and exit\

That file is not used in a production PacketFence system.
Doing that is useless.


> 
> #vim /usr/locol/pf/conf/mariadb/maraidb.conf.tt
> change as below:
> #socket    = /var/lib/mysql/mysql.sock
> socket  = /opt/sqldata/mysql.sock
> #innodb_data_home_dir = /var/lib/mysql
> innodb_data_home_dir = /opt/sqldata
> #innodb_log_group_home_dir = /var/lib/mysql
> innodb_log_group_home_dir = /opt/sqldata
> 
> #chown -R mysql:mysql /opt/sqldata 
> #reboot
> when system rebooted,pf still cannot connect database, the log show it as 
> below:
> Jul 25 11:03:21 localhost packetfence: FATAL -e(656): unable to connect to 
> database: Can't connect to local MySQL server through socket 
> '/var/lib/mysql/mysql.sock' (2 "No such file or directory") at -e line 1.
> how can I do to fix the problem?thank you!


Rebooting is unnecessary if all you want is to restart a service.
What is systemctl reporting?
What is journalctl showing?


Regards,
--
Louis Munro
[email protected] <mailto:[email protected]>  ::  www.inverse.ca 
<http://www.inverse.ca/> 
+1.514.447.4918 x125  :: +1 (866) 353-6153 x125
Inverse inc. :: Leaders behind SOGo (www.sogo.nu <http://www.sogo.nu/>) and 
PacketFence (www.packetfence.org <http://www.packetfence.org/>)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to