SlideShare a Scribd company logo
1 of 4
#################################### old MAMP log locations and dump commands
###############################
/Applications/MAMP/logs/php_error.log
/Applications/MAMP/logs/apache_error_log
/Applications/ MAMP/logs/mysql_error_log.err
Applications/MAMP/tmp/ mysql/my.cnf
/Applications/MAMP/Library/bin/mysql -u root -p root dbname < backup.sql
/Applications/MAMP/Library/bin/mysql_upgrade —password
pop out input: root
################################################################################
#####################
/Applications/MAMP/Library/bin/mysqldump -u root -p -h ip bini > backup.sql
mysqldump -u root -p bini > backup.sql
http://localhost/MAMP/?language=English
################################################################
http://wearepropeople.com/blog/how-to-configure-cybersource-secure-acceptance-
webmobile-in-drupal-7
https://www.drupal.org/project/commerce_cybersource_sawm
centos server
tail -f /var/log/httpd/php_errors_log
tail -f /var/log/httpd/error_log
local
tail -f /var/log/apache2/error_log
tail -f /var/log/php.errors
php.ini
error_log = /var/log/php_errors.log
tail -f /usr/local/var/mysql/media-mac-mini.bh.local.err
after changes in
/etc/my.cnf
#########################################################################
504 time out
cd /etc/httpd/conf
vi httpd.conf
nginx server
504 time out
increase the timeout on the server to 1000,
apachectl start
/sbin/service httpd restart
change time out in:
/etc/httpd/conf/httpd.conf
vi httpd.conf
/etc/init.d/httpd reload
# Timeout: The number of seconds before receives and sends time out.
#
##Timeout 120
Timeout 600
#########################################################################
mysql_upgrade -u root -p
aftr import a dumped sql from drush,
seems user and pwd not valid anymore.
root@localhost not permitted anymore
2006 Cannot log in to the MySQL server
sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server stop
on cents server
service mysql stop
sudo mysqld_safe --skip-grant-tables
mysql -u root
UPDATE mysql.user SET Password=PASSWORD('root') WHERE User='root';
UPDATE mysql.user SET Password=PASSWORD('yt@jing') WHERE User='jing1';
force https jing.com
then css style will work fine
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.46 sec)
if
mysql> FLUSH PRIVILEGES;
ERROR 1146 (42S02): Table 'mysql.columns_priv' doesn't exist
mysql_upgrade -u root -p
ERROR 1146 (42S02) at line 1135: Table 'mysql.tmp_proxies_priv' doesn't exist
ERROR 1146 (42S02) at line 1136: Table 'mysql.tmp_proxies_priv' doesn't exist
ERROR 1051 (42S02) at line 1137: Unknown table 'tmp_proxies_priv'
mysql> CREATE TABLE `servers` (
-> `Server_name` char(64) NOT NULL,
-> `Host` char(64) NOT NULL,
-> `Db` char(64) NOT NULL,
-> `Username` char(64) NOT NULL,
-> `Password` char(64) NOT NULL,
-> `Port` int(4) DEFAULT NULL,
-> `Socket` char(64) DEFAULT NULL,
-> `Wrapper` char(64) NOT NULL,
-> `Owner` char(64) NOT NULL,
-> PRIMARY KEY (`Server_name`)
-> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers
table';
ERROR 1050 (42S01): Table 'servers' already exists
use mysql;
mysql> q
sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server start
##############' ERROR! MySQL server PID file could not be
found!'#####################
sent out 89 bytes,
sudo mysql.server stop
make sure no mysql shows up under ps aux
sudo mysql.server start
access denied
ps aux | grep mysql
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
kill -9 1858
one mysql killed, the safe mode also killed
very useful
just try this
sudo mysql.server start
sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server restart
sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server start
mysqladmin shutdown
close the safe daemon
not working
SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+-----------+
| Variable_name | Value |
+--------------------+-----------+
| max_allowed_packet | 104857600 |
+--------------------+-----------+
1 row in set (0.00 sec)
mysql> SET @@global.max_allowed_packet = 16888228;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> SHOW VARIABLES LIKE 'max_allowed_packet';
+--------------------+-----------+
| Variable_name | Value |
+--------------------+-----------+
| max_allowed_packet | 104857600 |
/usr/local/var/mysql/media-mac-mini.bh.local.pid
not guaranteed to work
#create a my.cnf file and add the following (you can use vi: sudo vi /etc/my.cnf
or tools which can edit protected files such as textwrangler:
[mysqld]
max_allowed_packet = 64M
# for 2006 can not log in error mysql_pconnect(): send of 5 bytes failed
with errno=32
Broken pipe
wait_timeout=3600
reference: http://www.barebones.com/products/textwrangler/
##############################db Operations
#######################################################
TRUNCATEing all  cache  tables
shift to select the last table starting with cache,
select 'name' from system where filename like 'sites/all%' and status=1
update system SET status = 0 where name like 'uc_% ;
SELECT permission FROM role_permission WHERE rid = 1;
update system SET status = 0 where name like 'uc_% ;
SELECT permission
FROM perm
WHERE role = 1
servers
SELECT permission FROM role_permission WHERE rid = 1;

More Related Content

What's hot

Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPANJeen Lee
 
톰캣 #04-환경설정
톰캣 #04-환경설정톰캣 #04-환경설정
톰캣 #04-환경설정GyuSeok Lee
 
Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12
Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12
Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12akira6592
 
Ansible を完全にマスターする
Ansible を完全にマスターするAnsible を完全にマスターする
Ansible を完全にマスターするKeisuke Kamada
 
Using Test Kitchen for testing Chef cookbooks
Using Test Kitchen for testing Chef cookbooksUsing Test Kitchen for testing Chef cookbooks
Using Test Kitchen for testing Chef cookbooksTimur Batyrshin
 
Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyPeter Keung
 
Spark手把手:[e2-spk-s03]
Spark手把手:[e2-spk-s03]Spark手把手:[e2-spk-s03]
Spark手把手:[e2-spk-s03]Erhwen Kuo
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replicationorczhou
 
Firewall
FirewallFirewall
Firewalldcs2004
 
Spark手把手:[e2-spk-s01]
Spark手把手:[e2-spk-s01]Spark手把手:[e2-spk-s01]
Spark手把手:[e2-spk-s01]Erhwen Kuo
 
Choosing JavaScript Libraries - Refresh-Detroit.org
Choosing JavaScript Libraries - Refresh-Detroit.orgChoosing JavaScript Libraries - Refresh-Detroit.org
Choosing JavaScript Libraries - Refresh-Detroit.orgChris Lee
 
Bundler is the Best
Bundler is the BestBundler is the Best
Bundler is the Bestdead_arm
 

What's hot (20)

Chef solo the beginning
Chef solo the beginning Chef solo the beginning
Chef solo the beginning
 
Perlmania_Study - CPAN
Perlmania_Study - CPANPerlmania_Study - CPAN
Perlmania_Study - CPAN
 
톰캣 #04-환경설정
톰캣 #04-환경설정톰캣 #04-환경설정
톰캣 #04-환경설정
 
Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12
Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12
Ansibleではじめるサーバー・ネットワークの自動化 (Ansible2.7情報つき)2018/10/12
 
Ansible 2.0
Ansible 2.0Ansible 2.0
Ansible 2.0
 
EC2
EC2EC2
EC2
 
Ansible を完全にマスターする
Ansible を完全にマスターするAnsible を完全にマスターする
Ansible を完全にマスターする
 
Using Test Kitchen for testing Chef cookbooks
Using Test Kitchen for testing Chef cookbooksUsing Test Kitchen for testing Chef cookbooks
Using Test Kitchen for testing Chef cookbooks
 
Dev ops
Dev opsDev ops
Dev ops
 
Varnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites flyVarnish: Making eZ Publish sites fly
Varnish: Making eZ Publish sites fly
 
Spark手把手:[e2-spk-s03]
Spark手把手:[e2-spk-s03]Spark手把手:[e2-spk-s03]
Spark手把手:[e2-spk-s03]
 
Apresentação vagrant
Apresentação   vagrantApresentação   vagrant
Apresentação vagrant
 
Mina deploy
Mina deployMina deploy
Mina deploy
 
MySQL Replication
MySQL ReplicationMySQL Replication
MySQL Replication
 
Firewall
FirewallFirewall
Firewall
 
RSpec. Part 3
RSpec. Part 3RSpec. Part 3
RSpec. Part 3
 
Spark手把手:[e2-spk-s01]
Spark手把手:[e2-spk-s01]Spark手把手:[e2-spk-s01]
Spark手把手:[e2-spk-s01]
 
Network
NetworkNetwork
Network
 
Choosing JavaScript Libraries - Refresh-Detroit.org
Choosing JavaScript Libraries - Refresh-Detroit.orgChoosing JavaScript Libraries - Refresh-Detroit.org
Choosing JavaScript Libraries - Refresh-Detroit.org
 
Bundler is the Best
Bundler is the BestBundler is the Best
Bundler is the Best
 

Similar to Optimize MAMP log locations and MySQL dump commands

Multiple instances second method
Multiple instances second methodMultiple instances second method
Multiple instances second methodVasudeva Rao
 
Multiple instances on linux
Multiple instances on linuxMultiple instances on linux
Multiple instances on linuxVasudeva Rao
 
Really useful linux commands
Really useful linux commandsReally useful linux commands
Really useful linux commandsMichael J Geiser
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort webhostingguy
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort webhostingguy
 
Оптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикОптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикAgnislav Onufrijchuk
 
Aynchronous Processing in Kamailio Configuration File
Aynchronous Processing in Kamailio Configuration FileAynchronous Processing in Kamailio Configuration File
Aynchronous Processing in Kamailio Configuration FileDaniel-Constantin Mierla
 
Spider Setup with AWS/sandbox
Spider Setup with AWS/sandboxSpider Setup with AWS/sandbox
Spider Setup with AWS/sandboxI Goo Lee
 
MySQL Spider Architecture
MySQL Spider ArchitectureMySQL Spider Architecture
MySQL Spider ArchitectureI Goo Lee
 
Getfilestruct zbksh
Getfilestruct zbkshGetfilestruct zbksh
Getfilestruct zbkshBen Pope
 
Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Ben Pope
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1MySQL for Beginners - part 1
MySQL for Beginners - part 1Ivan Zoratti
 
PagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure TestingPagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure TestingPagerDuty
 

Similar to Optimize MAMP log locations and MySQL dump commands (20)

Multiple instances second method
Multiple instances second methodMultiple instances second method
Multiple instances second method
 
Multiple instances on linux
Multiple instances on linuxMultiple instances on linux
Multiple instances on linux
 
Memcached Study
Memcached StudyMemcached Study
Memcached Study
 
Really useful linux commands
Really useful linux commandsReally useful linux commands
Really useful linux commands
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
My sql administration
My sql administrationMy sql administration
My sql administration
 
Mysql
Mysql Mysql
Mysql
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Оптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчикОптимизация MySQL. Что должен знать каждый разработчик
Оптимизация MySQL. Что должен знать каждый разработчик
 
Httpd.conf
Httpd.confHttpd.conf
Httpd.conf
 
Aynchronous Processing in Kamailio Configuration File
Aynchronous Processing in Kamailio Configuration FileAynchronous Processing in Kamailio Configuration File
Aynchronous Processing in Kamailio Configuration File
 
Spider Setup with AWS/sandbox
Spider Setup with AWS/sandboxSpider Setup with AWS/sandbox
Spider Setup with AWS/sandbox
 
MySQL Spider Architecture
MySQL Spider ArchitectureMySQL Spider Architecture
MySQL Spider Architecture
 
Getfilestruct zbksh
Getfilestruct zbkshGetfilestruct zbksh
Getfilestruct zbksh
 
Getfilestruct zbksh(1)
Getfilestruct zbksh(1)Getfilestruct zbksh(1)
Getfilestruct zbksh(1)
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
MySQL for Beginners - part 1
MySQL for Beginners - part 1MySQL for Beginners - part 1
MySQL for Beginners - part 1
 
Operation outbreak
Operation outbreakOperation outbreak
Operation outbreak
 
PagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure TestingPagerDuty | OSCON 2016 Failure Testing
PagerDuty | OSCON 2016 Failure Testing
 

Optimize MAMP log locations and MySQL dump commands

  • 1. #################################### old MAMP log locations and dump commands ############################### /Applications/MAMP/logs/php_error.log /Applications/MAMP/logs/apache_error_log /Applications/ MAMP/logs/mysql_error_log.err Applications/MAMP/tmp/ mysql/my.cnf /Applications/MAMP/Library/bin/mysql -u root -p root dbname < backup.sql /Applications/MAMP/Library/bin/mysql_upgrade —password pop out input: root ################################################################################ ##################### /Applications/MAMP/Library/bin/mysqldump -u root -p -h ip bini > backup.sql mysqldump -u root -p bini > backup.sql http://localhost/MAMP/?language=English ################################################################ http://wearepropeople.com/blog/how-to-configure-cybersource-secure-acceptance- webmobile-in-drupal-7 https://www.drupal.org/project/commerce_cybersource_sawm centos server tail -f /var/log/httpd/php_errors_log tail -f /var/log/httpd/error_log local tail -f /var/log/apache2/error_log tail -f /var/log/php.errors php.ini error_log = /var/log/php_errors.log tail -f /usr/local/var/mysql/media-mac-mini.bh.local.err after changes in /etc/my.cnf ######################################################################### 504 time out cd /etc/httpd/conf vi httpd.conf nginx server 504 time out increase the timeout on the server to 1000, apachectl start /sbin/service httpd restart
  • 2. change time out in: /etc/httpd/conf/httpd.conf vi httpd.conf /etc/init.d/httpd reload # Timeout: The number of seconds before receives and sends time out. # ##Timeout 120 Timeout 600 ######################################################################### mysql_upgrade -u root -p aftr import a dumped sql from drush, seems user and pwd not valid anymore. root@localhost not permitted anymore 2006 Cannot log in to the MySQL server sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server stop on cents server service mysql stop sudo mysqld_safe --skip-grant-tables mysql -u root UPDATE mysql.user SET Password=PASSWORD('root') WHERE User='root'; UPDATE mysql.user SET Password=PASSWORD('yt@jing') WHERE User='jing1'; force https jing.com then css style will work fine mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.46 sec) if mysql> FLUSH PRIVILEGES; ERROR 1146 (42S02): Table 'mysql.columns_priv' doesn't exist mysql_upgrade -u root -p ERROR 1146 (42S02) at line 1135: Table 'mysql.tmp_proxies_priv' doesn't exist ERROR 1146 (42S02) at line 1136: Table 'mysql.tmp_proxies_priv' doesn't exist ERROR 1051 (42S02) at line 1137: Unknown table 'tmp_proxies_priv' mysql> CREATE TABLE `servers` ( -> `Server_name` char(64) NOT NULL, -> `Host` char(64) NOT NULL, -> `Db` char(64) NOT NULL, -> `Username` char(64) NOT NULL, -> `Password` char(64) NOT NULL, -> `Port` int(4) DEFAULT NULL, -> `Socket` char(64) DEFAULT NULL,
  • 3. -> `Wrapper` char(64) NOT NULL, -> `Owner` char(64) NOT NULL, -> PRIMARY KEY (`Server_name`) -> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table'; ERROR 1050 (42S01): Table 'servers' already exists use mysql; mysql> q sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server start ##############' ERROR! MySQL server PID file could not be found!'##################### sent out 89 bytes, sudo mysql.server stop make sure no mysql shows up under ps aux sudo mysql.server start access denied ps aux | grep mysql USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND kill -9 1858 one mysql killed, the safe mode also killed very useful just try this sudo mysql.server start sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server restart sudo /usr/local/Cellar/mysql/5.6.22/bin/mysql.server start mysqladmin shutdown close the safe daemon not working SHOW VARIABLES LIKE 'max_allowed_packet'; +--------------------+-----------+ | Variable_name | Value | +--------------------+-----------+ | max_allowed_packet | 104857600 | +--------------------+-----------+ 1 row in set (0.00 sec) mysql> SET @@global.max_allowed_packet = 16888228; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> SHOW VARIABLES LIKE 'max_allowed_packet'; +--------------------+-----------+ | Variable_name | Value | +--------------------+-----------+ | max_allowed_packet | 104857600 | /usr/local/var/mysql/media-mac-mini.bh.local.pid not guaranteed to work #create a my.cnf file and add the following (you can use vi: sudo vi /etc/my.cnf or tools which can edit protected files such as textwrangler:
  • 4. [mysqld] max_allowed_packet = 64M # for 2006 can not log in error mysql_pconnect(): send of 5 bytes failed with errno=32 Broken pipe wait_timeout=3600 reference: http://www.barebones.com/products/textwrangler/ ##############################db Operations ####################################################### TRUNCATEing all  cache  tables shift to select the last table starting with cache, select 'name' from system where filename like 'sites/all%' and status=1 update system SET status = 0 where name like 'uc_% ; SELECT permission FROM role_permission WHERE rid = 1; update system SET status = 0 where name like 'uc_% ; SELECT permission FROM perm WHERE role = 1 servers SELECT permission FROM role_permission WHERE rid = 1;