When setting up a server or group of servers for the first time you may find yourself wanting to create MySQL users without having to login to MySQL. It would make sense for the mysqladmin command to offer this functionality but it does not. Instead you can create the MySQL user with the mysql command as shown in the below example performed on a server running Ubuntu Linux 12.04 also known as Precise Pangolin.
Tags: all, alter, create, create tablespace, create user, execute, grant, index, Linux, LOCK TABLES, mysql, mysqladmin, permissions, reload, select, show databases, show view, super, trigger, ubuntu, update
Posts Tagged “grant”
Apr
12
2011
MySQL ERROR 1133 (42000): Can’t find any matching row in the user tablePosted by alex in ErrorsEarlier today after restoring a MySQL database I was attempting to grant a specific user access to a specific database but was receiving an error. I ended up being able to resolve the issue easily by flushing privileges but I wanted to note in case I ran into this again or so others could find the information useful. Tags: 1133, database, error, flush privileges, grant, grant all, localhost, mysql, mysql user, sqlI 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. Tags: create, database, ecommerce, flush privileges, grant, identified, localhost, mysql, mysqladmin, sql, user, zen cart, ZenCart
Dec
07
2010
PostgreSQL: ERROR: role “user” cannot be dropped because some objects depend on itPosted by alex in ErrorsWhen 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. Tags: access privileges, CLI, command line, database, error, grant, Linux, objects, postgres, PostgreSQL, privileges, psql, revoke, role, sql, table, user
Dec
07
2010
How To Remove Role Privileges Created By The PostgreSQL GRANT Command, Shell Script To Remove PostgreSQL Access PrivilegesPosted by alex in InsightsPostgreSQL 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. Tags: .sh, access privileges, database, grant, Linux, pgaccess.sh, pgsql, postgres, PostgreSQL, psql, removepgaccess.sh, revoke, role, select, shell, sql, table, table_schema, user |









Entries (RSS)