Custom Permissions
I need to assign different 3 different types of users, each with his own permissions and am unsure how to proceed. One of these users will require remote access to all records. I have mySQL 5 and mySQLadmin tool. Both are installed on WinXP and mySQL will be accessed through PHP's connection functions.
Can someone show me an example of setting a user with specific table and row privileges for security purposes? ie: a a user can't modify adata in x table, only read. Another user can write in rows w and x of table y only and can read all of y table but not table z.
View Complete Forum Thread with Replies
Related Forum Messages:
Create Custom Csv
Is there any mysql command that i can use from PHP to create csv file(tab, comma), xml file etc for one full table records including fields names, and different selected records e.g 1 ) make csv from full table with colum names in the first row 2) make csv based on WHERE clause lile WHERE id=90 OR id=100 OR id=2001
View Replies !
Custom Attributes.
I am currently working on a "vehicle" database for my company. I put the vehicle in quotes, because the vehicle list also includes things like jet skis and trailers. One thing I would like to do, is to have custom attributes or properties based on a vehicle class id. This way, I could have cars and trucks with properties like VIN and milage, but not have to show those fields on something like a jet ski or a lawn mower. A great example of this would be: PHP Auto Dealer Pro demo If you log in to the admin section and click custom fields, you can add fields and choose the type of field to add (text, dropdown, checkbox, radio or text area).
View Replies !
Custom Datatype
Is there any wat to create the Custom Datatype in MySQL? To create the Customdata Type in Oracle, I am using the Following Syntax. CREATE OR REPLACE TYPE <type_name> AS OBJECT ( <column_name> <data_type>, <column_name> <data_type>); I wish to know what is the Equivalent in MySQL.
View Replies !
Custom Field
I need to create sort of employee info database. Now I dont know the exact number of fields I need to save, i.e. there will be additional fields in future. I am talking about fields like employees, email, cellphone, address, phone etc currently I am advised to save keep record of only email and phone but I know in future there will be more. so I wanted to ask can I create a table like "ContactType" which has a field like Type whose values could be Email, phone, address etc ? but the problem is many of the fields have different datatypes e.g. Phone and email have both different datatype or e.g. salary, we often require mathematical calculations on numbers. so is there a way to include additional fields in a my database without much work? and change in the PHP code for retrieving those records
View Replies !
Custom Forum
I'm creating my own forum... unfortunately, my sticky script is being quite unpleasant. The sticky is.. sticking to the bottom!Here's my SQL query:Code: $fQuery = mysql_query("SELECT * FROM `forumtopics` WHERE `forum` = '$f' ORDER BY `sticky` ASC, `timeEdited` DESC LIMIT $limit1, $limit2") or die(mysql_error()); What's wrong? `sticky` is a boolean column, and `timeEdited is just a number (generated with time()).
View Replies !
Custom Functions
is there a way I can make custom functions in mysql? I need a function that will replace all & with blank all " with a blank all > with a blank all / with a blank and a few more
View Replies !
Custom User Right
I am building a usermanagement in PHP. My problem is user can couple other users to usergroup with more rights then the user himself. All the query's that I tried didn't work. Example show I am coupled to type_id 2. I want to show id 2 and 3, because type_id 1 has more rights then me.
View Replies !
Order By [custom Value]
My query returns the following: -------- Brands -------- Dell Apple Dell HP HP Compaq How can i make the result be ordered in the order I want - which is NOT alphabetically? I want all Dell's to be at top, then i want Apple, then HP, then Compaq. I can't use "ORDER BY Dell, Apple..." in the query? (these are values, not field names). If anyone possibly understood this: How can i achieve this? Is it possible to this directly in MYSQL, or do i have to use PHP etc. to sort it after the result is returned?
View Replies !
Custom AutoIncrement
I am putting together an application that will store client data. As clients data will be entered into the system they will be assigned a autogenerated/incrementing contract code. The code will be today's date as yyyymmdd followed by 4 digits...0001,0002, and so on. Lets say we are on November 1st, So the first client I would register would have as contractid 200811010001 and so on....
View Replies !
Custom Sort Order
I know you can order your recordsets by field either ASC or DESC. However, is it specifically possible to set a specified order? Example: Display records as B, C, A Instead of either A, B, C or C, B, A.
View Replies !
How Do I Create A Custom 'order By'?
This is more of a how-to-think issue combining php and database, not database specific. But SQL might be able to help that's why I post here. I have a page viewing person names from a mysql database. The result is pretty simple: Josh Mikael Peter Sara The database table is also very simple: p_id, p_name where p_id is an auto_increment, primary key. Now to the problem: I want to show the names in a custom order; i.e. Josh and Sara swaps. I'm doing a function in the backoffice web page where you decide this custom order. You also add and remove names here.
View Replies !
Custom Column Headers
I need to build a custom data grid/html table for my client. They want a table displaying data with multiple rows and columns, but they want to be able to add/remove columns that they can name however they want. So my question is what is the best way to setup the tables to handle that? Should I allow the name they set for columns to actually add a column to the table and store it that way, or store all the columns in a different table?
View Replies !
Custom ORDER BY Case
I have a products DB containing information on the product's name, category and subcategory. When displaying all products, I am sorting alphabetically (ASC) by category, then subcategory, then product name. This works well, except that I have a "Miscellaneous" category that I would like to be listed last, rather than alphabetically. It seems inefficient to select all products that are not "Miscellaneous", iterate through the result set, then perform a second SELECT statement just for the Misc items. Is there a way to apply ORDER BY to all results, but make an exception for a custom case which is selected last? The current SELECT statement, which is including Misc alphabetically along with everything else, is: SELECT * FROM products ORDER BY category, subcategory, name
View Replies !
Custom Alphanumeric AutoIncrement
I am aware of how to create an auto-increment field but I was wondering if it is possible to create a custom auto increment id using both Alpha and Numeric (ex. A001423)? If so, can you have the Alpha character roll-over sequentially (A999999 to B000000)?
View Replies !
Ordering Results Using Custom Order.. Eh...
bad topic title, sorry. I don't think this is possible, but it would be cool if it is somehow. Let say I have the following query: SELECT some_field, some_field2 FROM some_table WHERE some_field IN(5,4,8,2); As I understand it, as soon as MySQL finds a row matching the IN statement, it'll be 'added' to the record set. Is there any way to have MySQL return the records ordered by the IN clause? Something like: some_field some_field2 ---------- -------------- 5 blah 4 woo 8 eh? 2 woo 2 Instead of the following, which represents the regular sorting of the table's data: some_field some_field2 ---------- -------------- 2 woo 2 4 woo 5 blah 8 eh? I can rearrange the result set using PHP, but I'd love to know if MySQL offers something for this
View Replies !
Custom Columns Created For Clients
I have an odd problem that I need a solution for. I have a table that has perhaps 10 default columns. My clients need to be able to add their own columns to this table independently of eachother. I would also like the solution to work with link. I prefer to not create a unique database for each client.
View Replies !
Export Mysql To .txt (Custom Format Of File)
How can I generate a .txt file that follows a pre-defined exporting layout? Example: (Column name and the fixed char length the column must have NAME: 04 DIGITS LOCATION: 03 DIGITS FINAL LOCATION: 03 DIGITS ZONE: 02 DIGITS FINAL SUBZONE: 04 DIGITS CODE: 02 DIGITS Also the space between the values of the columns must be equivalent to a space bar only, not TAB.
View Replies !
Custom InnoDB Table Space In Windows
In Windows, there are lots of config files for MySQL. When installing MySQL, the config wizard created a single, autoextending ibdata1 file for InnoDB tablespace. However, I want to customize the tablespace. Instead of innodb_data_file_path = ibdata1:10M:autoextend I would like to have something like this innodb_data_file_path = ibdata1:650M;ibdata2:650M;ibdata3:650M But when I make this change in the file my-innodb-heavy-4G.ini the server fails to start. How can I change the default config for InnoDB and customize it to my needs?
View Replies !
Autoincrement Prefix 000 And Custom Starting Number
Q1) Since we all know that if we create an auto increment column, it will start from the number '1' but is there a way we can force it to start with the number '300' and it should increment to 301 on the next new record inserted then 302 and so on? Q2) Is there a way to make the auto increment field prefixed by 000? For example instead of making it run from the number '1' it should auto increment in this method '001' then 002 and so on?
View Replies !
MySQL Administrator -- Save Custom Graph
So im using the MySQL Administrator GUI (downloaded from mysql.com) and I LOVE IT! But, there is a slight issue. I want to save the graphs I create so that when I restart the machine the same graphs can be accessble. How can I save my graph formulas? If there something like .mysql-admin under the ~/ path or something like that?
View Replies !
Permissions On Mac
I used MAMP to set up MySQL and Apache on my Mac and installed Drupal. Everything was working fine but I thought that I had forgotten to change the password for the 'root' user in mysql. So,with MAMP when you go to "localhost:8888 it gives you a start page where you can access mysqladmin and others. I used mysqladmin to change the root user properties but now when I try to launch the start page I get "could not connect with mysql server" Any idea how I can get to MySQL another way and fix it without having to reinstall? My Drupal installation still works so I know MySQL is working but I can't get to the admin/start page anymore. Also, I'm a complete newb at this stuff.. I know I can go to a terminal session on my Mac to access mysql directly but I don't know enough about it to do anything.
View Replies !
Default Permissions
This is a fairly simple question but I'm new to mySQL. To log on to mySQL I need to type at the prompt: mysql --user='username' --password='password' as opposed to just typing mysql and being recognized without having to type identification. Anyone know how I can change this?
View Replies !
Database Permissions
I've got databases on one box i have to transfer to another box, both are running Linux one a Centos4 machine, the other rh9 i think. I could tar up the /var/lib/mysql directory, but i was lead to believe that was a bad idea. I don't know the permissions of the user's and i don't want to give out global permissions. What i was wondering is there a way i can do a mysqldump on the databases on machine1, which will drop everything needed to recreate them in to a .sql file, transfer that to machine2 and then use mysqladmin to load it and have all the settings back in business? I believe they're both mysql4 installs, though machine1 might be mysql3.23, not sure.
View Replies !
MySQL Have No Permissions
I have installed mysql (under SuSE 8.1) and everything seems to work fine when I am logged in as root. However, with my normal user profile I can get a mysql> prompt but have no permissions to carry out any database operations. I would really like to work with my normal profile and am hoping that it is merely a question of setting permissions correctly. Can anyone tell me which files and paths I should check (and change)? Ideally, I would like mysql to create and manage the database files in my normal /home directory (rather than in the mysql directories). Is this possible? Is this desirable? Which settings would I need to change to allow this? Or should I just let mysql create the databases in it's default directory and set the permissions there?
View Replies !
MySQL Permissions
I would like mysql to create and manage the database files in my normal /home directory (rather than in the mysql directories). Is this possible? Is this desirable? Which settings would I need to change to allow this? Or should I just let mysql create the databases in it's default directory and set the permissions there?
View Replies !
Permissions Change
Running MySQL 4.0.18 (upgraded from MySQL 3.x), I can set the host for a user to "%", and can connect from localhost just fine, as well as remote locations.On another server running 4.0.21 (clean install), if I set the host to "%", I cannot connect from localhost unless I also set a "localhost" entry as well for that user.
View Replies !
Permissions With New Db's
I've got php script that created a database, then the tables in the database. The user in which the script is run, doesn't have the permissions to create a 'new' db. Moreover, mysql says that because the user is trying to create a new db, and there isn't a row specifying that the use has permission, doesn't allow the user to create the db. My solution is that I can create a row in the mysql.db table that will allow for the user to have proper permissions. My problem is that once I insert that row, it takes another post to the page for the permission to actually take hold. Is there a way to have the permissions take hold sooner? Some of the things I have tried would be toRedirect the page to (with a php header call) to re-load the pageClose the mysql connection so that a new one would have to be opened
View Replies !
Resolving Permissions
I have mySQL Administrator (and subsequently mySQL) installed on my iBook. I want to connect to mySQL on my Red Had Linux 9 test server with the mySQL Administrator, but I get the following error message: Code: Could not connect to mySQL instance at [SERVER IP ADDRESS] Error: Host '[IBOOK IP ADDRESS]' is not allowed to connect to this mySQL server (code 1130) I'm sure there's an easy fix for this, but since I'm a bit new at this, I'm not sure where to look.
View Replies !
User Permissions
Is there a special permission required for a user to be able to run a "select ... into dumpfile" statement? I'm getting a 1045 error when attempting this on my server. I've already verified that file permissions are not an issue.
View Replies !
Trust Permissions
I am trying to configure a mySQL server on XP machine, and wish to allow ASP.NET application access the database from a remote machine. 1. How do I set Trust permissions to a catalog? 2. How do I allow remote connections?
View Replies !
Add Host To Permissions
Typically, one does something like "grant x,y,z on db.* to user1@localhost identified by 'password'". Is there a good way to clone the permissions for "user1@trusted-host1" et al? Particularly sometime later when one doesn't remember exactly what "x", "y" and "z" were exactly? I can look at the bazillion settings already there, but it's rather a pain to count exactly how many '"",''s and '"y",''s have to be where in the insert and what I really want is to just clone the entry, changing one field...
View Replies !
Outfile Permissions
I tried to write a query out to a file, but I got this message: ERROR 1 (HY000): Can't create/write to file '/home/jason/test.csv' (Errcode: 13) How can I set mysql to allow those permissions to write anywhere I want? When I don't specify the directory, the command works,
View Replies !
Root Permissions
root permissions are messed up, i'm unable to create new databases with root account and i cant change permissions for the root account while logged in as root mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'; ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
View Replies !
Permissions Problem
I can query my MySQL database with any SELECT, UPDATE, DELETE, etc. queries, and it works perfectly, but when I try to do a LOAD DATA INFILE query, I get a permissions problem. Any ideas why this might be?
View Replies !
User Doesn't Have Permissions?
I install a mysql backup utility to backup my database if things go wrong. I went to test it to make sure it would work as it emails me the sql file, I deleted my database (using phpmyadmin) and tried to import the sql file which shoots me an error giving me an error that I didn't have permission to create a database. How do I give myself permission to create a database?
View Replies !
Resetting Permissions On Windows
If I am using Win98 SE (yes yes, I agree...), will underneath still work: http://www.mysql.com/doc/en/Resetting_permissions.html ? I have tryed to follow above and similar advices, but haven't had a lot of luck. I will try again soon, but I was wondering wether there was an easier way (e.g. if there was a "reset" command I could run that also works on Win98). Code:
View Replies !
View User Permissions
Is there a way to query MySQL to find out what the permissions of the user currently connected For Example: Database: customer_contacts User : cust1 Table: Archives User Permissions: Read Only(SELECT). Is there a way to ask MySQL what User cust1 can do?
View Replies !
Database Creation Permissions
I have setup different MySQL users. I have removed all permissions for the users, and granted them full permission to their default databases I created for the. My question is, how can I grant the users permission to create databases. I want them to have full control to create databases, and delete any that they create. Is this possible, or do I need to create and remove databases for them as requested? I'm running mysql 3.2.5 on Redhat 9. I am not using any host permissions, table, or row permissions on the databases.
View Replies !
Remote Connection Permissions
I have mysql4 installed in RHEL4. I need to enable remote connection in this db so that application server can get connected to db server. For this, only creating user as grant all on db.* to remote@remoteipaddress identified by pwd; is this enough? or shud i do any other step.
View Replies !
Cannot Revoke Databases Permissions
I have Mysql 4.1.12 running on FreeBSD 4.9 in that i have 4 databases, mysql, test, new, and xyz I have one user abc, if i login through abc user i can see three databases new, test and xyz i want to remove access to xyz for user abc tried all command to remove access but didnt help and tried phpmyadmin also it seems when ever i create new abc user deleteing old it takes the old privileges of its own and again it shows access to 3 databases i just want access to test, new for user abc.
View Replies !
How To Check Permissions On Tables
I'm developing in Groupware (a php / template-based tool for making office-like applications). It creates mysql tables as it goes. I am not seeing those tables being created, and I'd like to determine if it's a permissions problem. I'm in a shell on a Linux system, but I'm very unfamiliar with Linux command line. So far, I can logon as root, use database, show tables; (this is how I know my tables aren't there.) So, what can I do to ensure that my permissions are set up correctly? When I was setting permissions in the Linux directories, I used 'chown'.
View Replies !
Creating A Database :: Don't Have Permissions
I put the commands in the terminal. mysql -h localhost -u metsuo -p Enter password: ******* then I get to where it shows "mysql>" then I type CREATE DATABASE shinko; and it says I don't have permisson as '@localhost' and I'm in root. Should I give write access to the directory?
View Replies !
Database User Permissions.
I have duplicated a working database which I wish to you. I have also duplicated the code (.asp) which reads, writes and updates the database. All works great when I am logged in to my PC because I have admin rights on this PC but when I test the exact same website with a general users account they get the following error:
View Replies !
Stored Procedures + Permissions
I'm on a shared host with MySQL 5.0.33. I want to use stored procedures and functions. Unfortunately I'm getting an error message when I try to create a new function. For example: SQL CREATE FUNCTION `gutenTag`() RETURNS varchar(20) CHARSET utf8 RETURN 'Guten Tag' ... ends with: #1044 - Access denied for user 'blah'@'%' to database 'blahblah' How can I check if I have permissions to create procedures/function?
View Replies !
Getting Current User Permissions
I'm on a shared host, but I'm looking for a "global" solution, since I'm writing an installer. I'm trying to get a list of the current user's permissions, I'm trying the user table, but no go. That's most likely blocked. I'm looking through commands, but nothing. Searching isn't turning up either. Is it just trial and error I guess, and catching the errors? What I want to do is to check if the user has the SELECT/INSERT/CREATE/DELETE/ALTER/UPDATE permissions, before proceeding.
View Replies !
Change/Create User Permissions
I have a remote db that I want to backup to my local MySQL server (windows). I can do a dump of the db from phpMyAdmin on the remote server. I try running it on my local server through the MySQL Control Center, and it says "Read Only". I don't have to enter password for root@localhost to login to the Control Center. I assume I don't have permissions to run DDL scripts as this user, and I can't figure out how to change this users permissions or create a new user with different privileges.
View Replies !
Newb Starting MySql-Permissions
I have debian running and this is how I have it setup # ls -ld /var/lib/mysql drwxr-xr-x 4 mysql mysql 4096 Aug 19 11:29 /var/lib/mysql I was shown how to setup a password for user mysql here http://dle.ascendant.ca/restoring-mysql-root-HOWTO.txt, because at one time all I would have to do it hit enter after # mysql -h localhost -p -u mysql Enter password: (no password is added I just hit enter) Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 16 to server version: 4.0.14-log Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> ( can do whatever I want now???) If I type in the correct password it lets me in, if I type in no passowrd it lets me in, if I type in the INCORRECT password it does NOT let me in. How can I make it so that if no password is typed it still treats it as incorrect?
View Replies !
|