PostgreSQL: ERROR: permission denied to reassign objects
When reassigning all database objects to a new owner in PostgreSQL you might get this error: mydb=> REASSIGN OWNED BY admin TO new_admin; ERROR: permission denied to reassign objects This…
find location of database files
MySQL 1. Connect to the mysql console: # mysql -p 2. Look the value of 'datadir' variable to find the location of database files: mysql> SHOW VARIABLES WHERE Variable_Name =…
mysql: change a user’s password
1. Login to mysql server with a user with enough privileges (usually root) $ mysql -u root -p 2. Select the database 'mysql' mysql> use mysql; 3. Modify the password…
mysql: show grants of all users
Unfortunately, there's no a single MySQL command to display all privileges granted to all users, but that information can be gathered with the following procedure: 1. Login as root (or…
Set up a master/slave replication in MySQL
Follow this step by step procedure to replicate a MySQL server (master) to another (slave): 1. CONFIGURE THE MASTER Enable binary log. To do this, add in / under section:…
mysql: ‘%’ doesn’t match localhost and/or hostname
PROBLEM: You granted access privileges to a user connecting from anywhere using this command: mysql> GRANT ALL PRIVILEGES ON *.* TO prueba@'%' IDENTIFIED BY 'password' Then, when you try to…
Cassandra troubleshooting
Execution of 'nodetool status' fails Common error messages: Error: Could not find or load main class Error opening zip file or JAR manifest missing : /usr/local/bin/../ Error occurred during initialization…
MySQL cheatsheet
Show MySQL configuration settings mysql> SHOW VARIABLES; Show MySQL running threads mysql > SHOW PROCESSLIST; Check the status of the tables of a database $ mysqlcheck -c <database>