Uncategorized,

fix lỗi wordpress bị lỗi auto_increment

Kiểm tra xem bảng nào không có auto_increment, nếu có kết quả thì nghĩa là các bảng đó không có auto_increment SELECT table_name FROM information_schema.tables WHERE table_schema = ‘vnsport_doelf’ AND table_type = ‘BASE TABLE’ AND table_name LIKE ‘sahdTR_%’ AND table_name NOT IN ( SELECT DISTINCT table_name FROM information_schema.key_column_usage WHERE table_schema = ‘vnsport_doelf’ AND constraint_name =

Công Việc,

cách kiểm tra log mysql

/etc/my.cnf hoặc /var/log/syslog /etc/my.cnf.d/ step1: Go to this file (/etc/mysql/conf.d/mysqld_safe_syslog.cnf) and remove or comment those line. step2: Go to mysql conf file (/etc/mysql/my.cnf) and add following lines To enable error log add following [mysqld_safe] log_error=/var/log/mysql/mysql_error.log [mysqld] log_error=/var/log/mysql/mysql_error.log To enable general query log add following general_log_file = /var/log/mysql/mysql.log general_log = 1 To enable Slow Query Log add following

Công Việc IT,

Could not resolve host: mirrorlist.centos.org Centos 7

vi /etc/yum.repos.d/CentOS-Base.repo [base] name=CentOS-$releasever – Base baseurl=http://vault.centos.org/7.9.2009/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [updates] name=CentOS-$releasever – Updates baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [extras] name=CentOS-$releasever – Extras baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [centosplus] name=CentOS-$releasever – Plus baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 yum clean all hoặc chạy lệnh sau sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo