Skip to content

Instantly share code, notes, and snippets.

@aldibier
aldibier / MySQL Root Password Recover
Last active August 17, 2017 18:03
MySQL Root Password Recover
MySQL - Resetting a lost MySQL root password
Article ID: 405 Last updated on August 31, 2012 Authored by: Rackspace Support
The MySQL root password allows full access to the MySQL database and allows for all actions to be undertaken including creating new users, new databases, setting access rules and so on.
Losing one can be a difficult issue to encounter. Luckily, resetting the root password is easy as long as you have sudo access to the Server.
Contents
1 Not the Server root user
@aldibier
aldibier / How to Create a New User and Grant Permissions in MySQL
Last active December 19, 2015 12:59
How to Create a New User and Grant Permissions in MySQL
How to Create a New User
Let’s start by making a new user within the MySQL shell:
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Sadly, at this point newuser has no permissions to do anything with the databases. In fact, if newuser even tries to login (with the password, password), they will not be able to reach the MySQL shell.
Therefore, the first thing to do is to provide the user with access to the information they will need.
@aldibier
aldibier / How to add a user to www-data (Ubuntu)
Last active November 24, 2022 13:06
How to add a user to www-data (Ubuntu)
Add a new user to the www-data group
In this example, add a new user called vivek to the www-data group, enter:
sudo useradd -g www-data vivek
### set the password for vivek user ###
sudo passwd vivek
@aldibier
aldibier / Instalación de Servidor LAMP Optimizado para Drupal
Last active December 20, 2015 14:29
Pasos de instalación para un servidor LAMP con configuraciones optimizadas para Drupal
--------------------
Información
--------------------
- Ubuntu 12.04 LTS
- Linode
- MEM: 1GB
- CPU: 8 CORES
#! /bin/bash
# script to configure a new Drupal Server
=== Generate SSH Keys ===
https://help.github.com/articles/generating-ssh-keys
=== Force git to overwrite local files on pull ===
git fetch --all
git reset --hard origin/master
git fetch downloads the latest from remote without trying to merge or rebase anything. Then the git reset resets the master branch to what you just fetched.
@aldibier
aldibier / Instalación de un servidor Nginx+PHP-FPM Optimizado para Drupal
Last active August 29, 2015 14:00
Instalación de un servidor Nginx+PHP-FPM Optimizado para Drupal
--------------------
Información
--------------------
- Ubuntu 12.04 LTS
- Linode
- MEM: 4GB
- CPU: 4 CORES
=== Instalar Tomcat ===
$ sudo apt-get install tomcat6
=== Instalar java ===
$ sudo apt-get install java7-sdk
=== Instalar Solr ===
Para instalar Jenkins es tan sencillo como copiar el archivo .war descargado desde http://jenkins-ci.org/ a la carpeta weapps de Tomcat
$ wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
$ sudo mv jenkins.war /var/lib/tomcat7/webapps/
Ingrese a la administración web de tomcat e inicie el servicio.
-- Importante --
Si al iniciar el servicio dice que fallò y catalina.out le arroja un error que dice algo como lo siguiente:
La idea es montar un servidor en Jenkins que pueda automatizar las tareas que se realizan en SeeD.
------- ESTO ES UN BORRADOR -------
Instalamos git y clamav
$ sudo aptitude install git-core clamav-daemon