SET PASSWORD FOR 'bob'@'%.example.org' = PASSWORD('cleartext password');

Custom Exposure

Count number of records in array: db.data_records.count( { dataset_id: { $in: [ 2509, 2224, 2128, 2145, 2472, 2249 ] } } ) Count number of records...

ActiveRecord::Schema.define do <> end

thegeekstuff.com

backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql

SELECT table_schema 'DB Name', round(Sum(data_length + index_length) / 1024 / 1024, 1) 'DB size in MB' FROM information_schema.tables...

codedecoder.wordpress.com

bundle exec sidekiq -e staging -d -L log/sidekiq.log sidekiq -h -c, –concurrency INT processor threads to use -d, –daemon Daemonize...

wikis.oracle.com

mysql>CREATE DATABASE memcachedSample; mysql>CREATE USER 'web20'@'localhost' IDENTIFIED BY 'web20'; mysql>GRANT ALL PRIVILEGES ON memcachedSample.* TO 'web20...

drop index index_name on table_name

gist.github.com

c = ActiveRecord::Base.connection c.tables.collect do |t| columns = c.columns(t).collect(&:name).select {|x| x.ends_with?("_id" || x.ends_with("_type"))}

SELECT AUTO_INCREMENT FROM information_schema.TABLES WHERE TABLE_SCHEMA = "databaseName" AND TABLE_NAME = "tableName" alter table tablename auto_increment = newvalue

SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB",

Best results in other decks

api.rubyonrails.org

When working with file uploads, we sometimes need to process intrinsic properties like the page count or page dimensions of...

If you need to implement newsletter sending, rapidmail is a solid option. Support is very fast, friendly and helpful, and...

Search in all decks