• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question mariadb move

Joao Pereira

New Pleskian
Hi!

Mounted a new disk under /mnt/data

Just synced with rsync my mariadb to the new location:
Code:
sudo rsync -av /var/lib/mysql /mnt/data

And then i've updated my my.conf with the new directory
Code:
sudo nano /etc/my.cnf

Tried to start mariadb, but only achieved that when i disabled SELinux. Don't know why.
Now i have my database running, but plesk is giving:

Server Error
500
Zend_Db_Adapter_Exception
SQLSTATE[HY000] [2002] No such file or directory


Anyone has a clue how to fix it?

Thanks,
 
done some other tests and nothing.

Listened to /var/log/plesk/panel.log
Code:
[2019-07-25 13:20:05.946] ERR [panel] SQLSTATE[HY000] [2002] No such file or directory:
0: /usr/local/psa/admin/plib/vendor/plesk/zendframework/library/Zend/Db/Adapter/Pdo/Abstract.php:144
        Zend_Db_Adapter_Pdo_Abstract->_connect()
1: /usr/local/psa/admin/plib/vendor/plesk/zendframework/library/Zend/Db/Adapter/Pdo/Mysql.php:111
        Zend_Db_Adapter_Pdo_Mysql->_connect()
2: /usr/local/psa/admin/plib/vendor/plesk/zendframework/library/Zend/Db/Adapter/Abstract.php:460
        Zend_Db_Adapter_Abstract->query(string 'SET sql_mode = ''', array)
3: /usr/local/psa/admin/plib/vendor/plesk/zendframework/library/Zend/Db/Adapter/Pdo/Abstract.php:238
        Zend_Db_Adapter_Pdo_Abstract->query(string 'SET sql_mode = ''', array)
4: /usr/local/psa/admin/plib/Db/Adapter/Pdo/Mysql.php:30
        Db_Adapter_Pdo_Mysql->query(string 'SET sql_mode = ''')
5: /usr/local/psa/admin/plib/CommonPanel/Application/Abstract.php:90
        CommonPanel_Application_Abstract::initDbAdapter()
6: /usr/local/psa/admin/plib/Session/Helper.php:165
        Plesk\Session\Helper::initStorage()
7: /usr/local/psa/admin/plib/auth.php:254
        AutoPrepend->initUserSession()
8: /usr/local/psa/admin/plib/auth.php:203
        AutoPrepend->run()
9: /usr/local/psa/admin/plib/auth.php:579
[2019-07-25 13:20:05.997] ERR [panel] Cannot load settings: SQLSTATE[HY000] [2002] No such file or directory

Was trying to see wich file or folder was wrote or read...

My my.cfg:
Code:
[mysqld]
local-infile=0
datadir=/mnt/data/mysql
socket=/mnt/data/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

[mysqld_safe]
#log-error=/var/log/mariadb/mariadb.log
#pid-file=/var/run/mariadb/mariadb.pid

[client]
port=3306
socket=/mnt/data/mysql/mysql.sock

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
 
@IgorG

/var/log/mariadb/mariadb.log
Code:
190726 12:04:29 mysqld_safe Starting mysqld daemon with databases from /mnt/data/mysql
190726 12:04:29 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 11786 ...
190726 12:04:29 InnoDB: The InnoDB memory heap is disabled
190726 12:04:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190726 12:04:29 InnoDB: Compressed tables use zlib 1.2.7
190726 12:04:29 InnoDB: Using Linux native AIO
190726 12:04:29 InnoDB: Initializing buffer pool, size = 128.0M
190726 12:04:29 InnoDB: Completed initialization of buffer pool
190726 12:04:29 InnoDB: highest supported file format is Barracuda.
190726 12:04:29  InnoDB: Waiting for the background threads to start
190726 12:04:30 Percona XtraDB (http://www.percona.com) 5.5.59-MariaDB-38.11 started; log sequence number 6470944
190726 12:04:30 [Note] Plugin 'FEEDBACK' is disabled.
190726 12:04:30 [Note] Server socket created on IP: '0.0.0.0'.
190726 12:04:30 [Note] Event Scheduler: Loaded 0 events
190726 12:04:30 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.60-MariaDB'  socket: '/mnt/data/mysql/mysql.sock'  port: 3306  MariaDB Server
 
Back
Top