Technology Insights

Create Zen Cart MySQL Database And MySQL User

I always forget specific MySQL syntax including creating a MySQL user and granting that user specific access only via localhost to a specific database. So when I install Zen Cart I always end up looking how to do this via the MySQL documentation. Below are simple instructions on how to create a MySQL database using mysqladmin, create a MySQL user, and grant permission to the created database to the created MySQL user.

Technology Errors

PostgreSQL: ERROR: role “user” cannot be dropped because some objects depend on it

When attempting to remove a user role from PostgreSQL it is possible to get an error. This error will be received if the role attempting to be removed still has access privileges for instance SELECT privileges on specific tables. Below I describe the error as well as how to remove access privileges for each table as well as a link to a previous article we wrote that will loop through every table within a specified database and revoke privileges.

Technology Insights

How To Remove Role Privileges Created By The PostgreSQL GRANT Command, Shell Script To Remove PostgreSQL Access Privileges

PostgreSQL isn’t the most friendly when it comes to creating access to various databases or tables within those databases however with a couple easy shell scripts it becomes much easier. I previously wrote this article regarding a shell script created to provide SELECT access, which is essentially read only access,┬áto every table located within a specified database. The problem now might be if you want to remove a user from having access to that database you will be required to manually remove each access privilege for the role you created. Below is the reverse of the initial shell script which will remove SELECT access from each table within a specified database.

Technology Insights

Mount Shared Drives using Active Directory and a Log On Script

I recently completed a job were the company insisted in powering down the work station every night. This caused a problem because there were shared drives on the server which did not reconnect a boot time. The drives would appear to be disconnected with red X’s however when the user clicked on them they would connect. So although they were working the fact that they did not auto connect was annoying.

Code Snippets

Shell Script To Configure A Read Only User On A PostgreSQL Database

**UPDATE: New article here.

Its a little more complicated to create a read only database user with PostgreSQL than say using something like MySQL. You will need to grant select access on each table in the database for the read only user. Keep in mind that each time you add a new table you will need to either run the shell script below again or manually grant select access on the new table for the read only user.