CyberPanel Community

Mysql: unknown variable 'datadir=/var/lib/mysql

al
aldhinya #1

Can anyone help me? I don’t know when this started happening, I’ve tried upgrading cyberpanel to version 2.3. I am using centos 7.

mysql: unknown variable ‘datadir=/var/lib/mysql’

SS

5 replies
sh
shoaibkk #2

What acutely you want to do?

al
aldhinya #3

mysql dump

jo
josephgodwinke #4

Hello @aldhinya

Try this nano /home/cyberpanel/.my.cnf

[mysqldump]
user=root
password=1234567
max_allowed_packet=1024M
[mysql]
user=root
password=1234567

# Add the bunch below this line


[mysqld]
datadir= /var/lib/mysql
user= mysql
pid-file= /var/lib/mysql/mysql.pid
socket= /var/lib/mysql/mysql.sock
port= 3306

then restar mysql service

sudo /etc/init.d/mysql restart
jo
josephgodwinke #6

Sorry i move the datadir above all the other directives. See previous post

Sign in to reply