SSH method
Login to SSH as root and Run below line.
echo 500 > /etc/virtual/bdhostit.com/limit/helpdesk1
The above command will increase daily email sending limit to 500 of helpdesk1@bdhostit.com.
Change the bold text replacing your details.
by dev
SSH method
Login to SSH as root and Run below line.
echo 500 > /etc/virtual/bdhostit.com/limit/helpdesk1
The above command will increase daily email sending limit to 500 of helpdesk1@bdhostit.com.
Change the bold text replacing your details.
by dev
This would mean that the account likely already exists on the system in /etc/passwd, and the the data in /usr/local/directadmin/data/users/username does not exist.
userdel -r username
cd /usr/local/directadmin/scripts ./fix_da_user.sh username user domain.com
by dev
Purpose:
To solve the error “General error: 1005 Can’t create table ` `.`review_round_files` (errno: 150 “Foreign key constraint is incorrectly formed”)”
We will convert MySQL tables from MyISAM into InnoDB in two different ways.
PhpMyAdmin
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,' ENGINE=InnoDB;')
FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'DBNAME' AND ENGINE = 'MyISAM' AND TABLE_TYPE = 'BASE TABLE'
ALTER TABLE DBNAME.access_keys ENGINE=InnoDB; ALTER TABLE DBNAME.announcement_settings ENGINE=InnoDB; ALTER TABLE DBNAME.announcement_type_settings ENGINE=InnoDB; ALTER TABLE DBNAME.announcement_types ENGINE=InnoDB; ALTER TABLE DBNAME.announcements ENGINE=InnoDB; ALTER TABLE DBNAME.article_event_log ENGINE=InnoDB; ALTER TABLE DBNAME.auth_sources ENGINE=InnoDB;
SSH Method
mysql -u root -p
SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;')
FROM INFORMATION_SCHEMA.TABLES
WHERE ENGINE='MyISAM'
AND table_schema = 'yourdb';
Replace yourdb to your database name. And the conversion commands will be used later.
use yourdb
ALTER TABLE pln_deposit_objects ENGINE=InnoDB; ALTER TABLE issues ENGINE=InnoDB; ALTER TABLE custom_section_orders ENGINE=InnoDB; ALTER TABLE access_keys ENGINE=InnoDB; ALTER TABLE journals ENGINE=InnoDB; ALTER TABLE notification_subscription_settings ENGINE=InnoDB; ALTER TABLE notifications ENGINE=InnoDB; ALTER TABLE review_object_types ENGINE=InnoDB; ALTER TABLE filter_settings ENGINE=InnoDB; ALTER TABLE users ENGINE=InnoDB;
That’s all.
Related scripts you may need.
Convert all DBNAME’s InnoDB Tables to MyISAM
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,' ENGINE=MyISAM;')
FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'DBNAME' AND ENGINE = 'InnoDB' AND TABLE_TYPE = 'BASE TABLE'
Convert all DBNAME’s MyISAM Tables to InnoDB
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,' ENGINE=InnoDB;')
FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'DBNAME' AND ENGINE = 'MyISAM' AND TABLE_TYPE = 'BASE TABLE'
Convert all InnoDB Tables to MyISAM (all databases)
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ' engine=MyISAM;')
FROM information_schema.TABLES WHERE ENGINE = 'InnoDB';
Convert all MyISAM Tables to InnoDB (all databases)
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ' engine=InnoDB;')
FROM information_schema.TABLES WHERE ENGINE = 'MyISAM';
by dev
To move a database from one user, to another user, run the following command:
VERBOSE=1 DBUSER="da_admin" DBPASS="da_adminpass" USERNAME="username" NEWUSERNAME="newusername" /usr/local/bin/php /usr/local/directadmin/scripts/change_database_username.php
by dev
Using php in CLI mode (not suPhp) to change the open_basedir value,:
Admin Level -> Custom httpd configuration -> domain.com
Insert below line In the top text area:
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp:/var/tmp/:/usr/local/lib/php/|