Skip to content

Instantly share code, notes, and snippets.

@ainsofs
Created June 19, 2015 18:57
Show Gist options
  • Save ainsofs/dd60cf6729ac4ea293ff to your computer and use it in GitHub Desktop.
Save ainsofs/dd60cf6729ac4ea293ff to your computer and use it in GitHub Desktop.
drupal drush
-- create drupal databases
mysql -u root -p
CREATE DATABASE drupal;
CREATE USER drupaluser@localhost IDENTIFIED BY 'password';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,INDEX,ALTER,CREATE TEMPORARY TABLES,LOCK TABLES ON drupal.* TO drupaluser@localhost;
FLUSH PRIVILEGES;
-- query database
select host, user, password from mysql.user;
SET PASSWORD FOR 'bob'@'%.example.org' = PASSWORD('cleartext password');
SHOW DATABASES;
--download drupal to current folder
drush dl drupal-7.x
--instal drupal
drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://YourMySQLUser:RandomPassword@localhost/YourMySQLDatabase
--moving downloaded files to another folder
sudo rsync -avz . /var/www/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment