This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO directory_country_region VALUES (NULL,'UY','AR','Artigas'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','CA','Canelones'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','CL','Cerro Largo'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','CO','Colonia'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','DU','Durazno'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','FS','Flores'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','FD','Florida'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','LA','Lavalleja'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','MA','Maldonado'); | |
INSERT INTO directory_country_region VALUES (NULL,'UY','MO','Montevideo'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE catalog_category_entity_tmp LIKE catalog_category_entity; | |
INSERT INTO catalog_category_entity_tmp SELECT * FROM catalog_category_entity; | |
UPDATE catalog_category_entity cce | |
SET children_count = | |
( | |
SELECT count(cce2.entity_id) as children_county | |
FROM catalog_category_entity_tmp cce2 | |
WHERE PATH LIKE CONCAT(cce.path,'%') | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout domain.key -out domain.crt | |
upstream fastcgi_backend { | |
#server 127.0.0.1:9000; | |
server unix:/var/run/php/php7.0-fpm.sock; | |
} | |
server { | |
listen 80; | |
listen 443 ssl; | |
ssl_certificate /var/server/web/ssl/domain.crt; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.servermom.org/install-varnish-3-to-run-with-apache-2-on-centos-server/ | |
rpm -Uvh https://packagecloud.io/varnishcache/varnish30/packages/el/6/varnish-3.0.7-1.el6.x86_64.rpm | |
yum install varnish | |
sudo nano /etc/httpd/conf.d/000-default.conf | |
NameVirtualHost *:8082 | |
<VirtualHost *:8082> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf | |
> bind-address = 0.0.0.0 | |
> sudo systemctl restart mysql.service | |
> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password'; | |
> FLUSH PRIVILEGES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name domain.tld www.domain.tld; | |
root /var/server/web/site; | |
location / { | |
index index.php index.html; | |
try_files $uri $uri/ @handler; | |
expires 30d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Export | |
mysqldump -uxxx -pxxx data_base > data_base.sql | |
# Import | |
mysql -uxxx -pxxx data_base < data_base.sql | |
# Import Pipe View | |
pv data_base.sql | mysql -uxxx -pxxxx data_base | |
# Import Source |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pv sqlfile.sql | mysql -uxxx -pxxxx dbname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; | |
Edit /etc/mysql/my.cnf | |
Comment address binding bind-address = 127.0.0.1 to #bind-address = 127.0.0.1 |
NewerOlder