WordPress :: Add Admin User using MySQL Command Line
Posted by blackonsole on January 8th, 2013 02:06 AM | No Comment
:: How to add Admin User via MySQL Command Line
+ Login to mysql and select WordPress database
mysql -uroot -p
mysql>use db_wp;
+ Show tables value to check user id
mysql>select * from wp_users;
+ Add user admin level
mysql>insert into wp_users (ID,user_login,user_pass,user_nicename,user_email,user_url,user_registered,user_activation_key,user_status,display_name) values ('11','User Admin',MD5('AdminPassword','User ...
Postfix :: Blocking extension file
Posted by blackonsole on January 5th, 2013 09:31 AM | No Comment
:: How to blocking extension file in Postfix
+ add mime_header_checks
vi /etc/postfix/main.cf
# add line like this:
mime_header_checks = regexp:/etc/postfix/mime_blocking
+ add file extension
vi /etc/postfix/mime_blocking
# add line like this:
/name=*.(bat|exe)/ REJECT
:: Links
+ Google
+ Cyberciti
MySQL :: Change user password
Posted by blackonsole on December 30th, 2012 01:22 AM | No Comment
:: How to change user password in MySQL
mysql -uroot -p
mysql> use mysql;
mysql> set password for 'username'@'hostname' = password('new-user-password');
:: Links
+ Google
+ CyberCiti
MySQL :: dump a few tables
Posted by blackonsole on December 18th, 2012 12:56 PM | No Comment
:: How to dump a few tables in mysql
mysql databasename -u -p -e 'show tables like "table_name_%"' | grep -v Tables_in | xargs mysqldump -u -p >
:: Link
+ Google
+ StactExchange
MySQL :: Cannot load from mysql.proc. The table is probably corrupted
Posted by blackonsole on December 18th, 2012 12:52 PM | 2 Comments
:: How to fix Cannot load from mysql.proc. The table is probably corrupted in mysql
Try to run this command line:
mysql_upgrade
or
mysql_upgrade -uroot -p --force
:: Link
+ Google
+ WebCheatSheet
DirectAdmin :: Enable PHP Zend Module
Posted by blackonsole on December 7th, 2012 01:03 PM | No Comment
:: How to enable PHP Zend Module on DirectAdmin
cd /usr/local/directadmin/custombuild
vi options.conf
# change on this line:
zend=yes
./build zend
+ checking
$ php -v
PHP 5.3.19 (cli) (built: Dec 6 2012 16:00:25)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
...
CentOS :: /etc/bashrc read-only
Posted by blackonsole on November 23rd, 2012 01:56 AM | No Comment
:: How to fix /etc/bashrc read only issue on CentOS
+ error permission denied
# echo "alias ftp='/usr/bin/ftp'" >> /etc/bashrc
-bash: /etc/bashrc: Permission denied
# ls -l /etc/bashrc
-rw-r--r-- 1 root root 1708 Sep 22 2009 /etc/bashrc
+ check and change attribute file
# lsattr /etc/bashrc
----i-------- ...