Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Privilege System


Can I change structure on "mysql" database to implement new Privilege System?
Views named "user", "host" etc will return old structure style.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Privilege System
Is there a way to limit update access for a user to a single record? I have a database table that contains various information about people. That information is contained in a record for each person. I want people to have read access to the whole table but update access only to their own record. Is  this possible and if so how would I set it up?

Disable Privilege System
If I set skip-networking, what is the security risk if I also skip-grant-tables? Is there any performance benefit that might justify leaving the privilege system disabled?

This is a dedicated database that runs on the same machine that hosts the application that it supports.

Privilege Not Set
I'm using MySQL Server 4.1 and want to set the privileges for the users in the DOS environment. (I use the DOS environment since I need to use OLD_PASSWORD - which I haven't found in MySQL Administrator). However, when I issue a command like this

update user set Select_priv='y' where user='username';

there is a space (!?!) where there should be 'y' or 'n' under the Select_priv column. How can I set the privileges correctly?

Users Privilege
i noticed that when i connect to MySQL with php using:

mysql_connect();
or:
mysql_connect("dbhost", "dbusername", "dbpassword");

always will be connected and the user can do anything like creating databases or delete.
how can i prevent it? i just want the root user can do it.

Column Privilege
I am having problems granting column privileges. I want to grant the
update privilege (only) to a column (called pass) in a table (called
Acct). Here's what I get:

mysql> grant update pass on practicedb.Acct to JohnDoe@localhost;
ERROR 1064: You have an error in your SQL syntax near 'pass on
practicedb.Acct to JohnDoe@localhost' at line 1

I don't understand how the syntax is wrong. I think I followed the
instructions in the manual. I don't have any problems granting table
privileges--just column.

Privilege Configuration
a user that is not quite normal and not quite root. Specifically, I am looking for a setup that would allow this user to create/delete and grant lower "normal" users access to databases for learning. However, I do not want this user to have the ability to do anything to the main mysql database containing user information.

User Privilege
I am writing a 'configurator', which will be used to select support products for hardware support service products; a customer selects product type -> product description -> service level and a part code is returned. This configurator will be given to various top-name UK hardware resellers.

There is a table of product codes and a column for each supplier's corresponding part code, e.g. packCode,supplier1_code,supplier2_code, etc. The columns correspond to the user names supplier1, supplier2, etc.

I don't want there to be a situation arise where supplier1 could potentially view supplier2's part codes and so have set up users for supplier1 and supplier2.

When I set up each user through the virtual host (FastHosts UK), the following privileges are set up by default: Code:

GRANT Privilege
I installed mysql using mysql account and have changed the ownership for all the mysql installation dir and files. When i do SHOW DATABASE, it just show test db. How do i grant the privileges to the mysql account itself?

GRANT, Privilege
I have a new DB provided by my ISP don't know details of installation,
setup etc.

I can log in as anybody except root.

mysql -h localhost -u mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 71 to server version: 4.0.16-log

mysql -h localhost -u xxxxx
Welcome to the MySQL monitor. Commands end with ; or g.

mysql -h localhost -u skrtfl
Welcome to the MySQL monitor. Commands end with ; or g.

....
....

mysql -h localhost -u root
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)

using the sys root password ===>
mysql -h localhost -u root -p********
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

using another, actually only a slight variant of the former "the
terminal question mark" as part of the password ===>
mysql -h localhost -u root -p********?
mysql: No match.

Why is there a difference re: ERROR 1045: and mysql: No match ?

Not knowing what my ISP has done, what is the best approach to reset
password (GRANT etc).

Creating Privilege
I own a domain with somebody else, and neither of us are really great with mySQL... So, there is only one login that we both use. I wanted to create a database, and so I logged in, and it says that I have "No Privileges". Error code #1044, when I tried creating one.

Account Privilege
Which account privileges are required to execute CREATE DATABASE ?
Are the minimum required privileges or does MySQL user must have ALL
privileges to execute CREATE DATABASE ?

Column Privilege Problem
I am having problems granting column privileges. I want to grant the
update privilege (only) to a column (called pass) in a table (called
Acct). Here's what I get:

mysql> grant update pass on practicedb.Acct to JohnDoe@localhost;
ERROR 1064: You have an error in your SQL syntax near 'pass on
practicedb.Acct to JohnDoe@localhost' at line 1

I don't understand how the syntax is wrong. I think I followed the
instructions in the manual. I don't have any problems granting table
privileges--just column.

Resetting Permission/privilege
I accidentally changed the privilege of the root user for the mysql DB to 'N' for all!! Now when I try to run any query on any of the table I get the:
Quote:
mysql> select * from users;
ERROR 1044: Access denied for user: 'root@localhost' to database 'mysql'

Limit Database Creation Privilege?
you all must know about it.. you buy a hosting account and you can only create mysql databases or something like it.. i was wondering how that is done.. i couldn`t find a limit database creation in the mysql manual..

or are those scripts just counting the databases and return false when it equals or exeeds a given number?

Can't Open Privilege Tables Error
when I try to run mysql I get the following error

Fatal error: Can't open privilege tables: File '/usr/local/mysql-max-4.0.20-pc-linux-i686/share/mysql/charsets/?.conf' not found (Errcode: 2)

Can't Open And Lock Privilege Tables
I have just installed MySQL 5.0 for the first time. When I try to start the server under my user name I get the following error message:

060818 10:45:45 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

What does this mean and what can I do about it? I have given mysqlf access to /var/lib/mysql.

Mysql Privilege Table After HD Crash
It shows this error:

041114 14:01:51 [ERROR] Fatal error: Can't open privilege tables: Table 'mysql.user' doesn't exist

How do I create a new one without loosing all the other tables that seems to be ok? As soon as I start the mysql it exits.

Column Privilege Problem--Solved
I solved the problem--I needed ( ) around the column list. I think
the manual should make that more clear.

I want to grant the
update privilege (only) to a column (called pass) in a table (called
Acct). Here's what I get:

mysql> grant update pass on practicedb.Acct to JohnDoe@localhost;
ERROR 1064: You have an error in your SQL syntax near 'pass on
practicedb.Acct to JohnDoe@localhost' at line 1

I don't understand how the syntax is wrong.I think I followed the
instructions in the manual.I don't have any problems granting table
privileges--just column.

Win200 - Lost Root Privilege
------=_NextPart_000_0023_01C35B54.206CFD60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I am working on a Windows 2000 server.
The version 4.0.13 was installed at the end of June because we are looking
at using MySQL.

Me and the other guy are novice with MySQL.
I read the different emails about access and granting and password and
flushing privilege from other people who couldn't get access.

To get to the point, I know that the guy has altered the privileges and lost
the password he would have set for root.
mysqld was started from DOS window using mysqld and the window was closed.
When I go to Task Manager, I see the mysqld process running.

When I use now mysqld, if I try to specify root, because of not knowing the
root password, I can't get correct privilege to run the shutdown command.
If I just type mysql, I am user ODBC@localhost and the only database I see
is test. Since mysql database is not visible, I know that I cannot set
privilege from this user.

So my goal is to desinstall v4.0.13, and re-install v4.0.14.
But my current issue is "how do I stop the mysqld process?"
Even if stopping from Task Manager is not the best approach, do I have
another option?

Can't Open And Lock Privilege Tables
My server was running fine then all of a sudden it stopped working. The error log shows the below. I've tried everything listed in the other parts of the forum regarding how to correct this but it is not corrected. I can't get the MySQL deamon to even start to do half the recomendations. I'm quite frustrated. Could someone please guide me on how to resolve this issue and why it happened in the first place:

060616 21:58:20 [Warning] No argument was provided to --log-bin, and --log-bin-i
ndex was not used; so replication may break when this MySQL server acts as a mas
ter and has his hostname changed!! Please use '--log-bin=enssbos-bin' to avoid t
his problem.
060616 21:58:21 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060616 21:58:21 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 1 385924437.
InnoDB: Doing recovery: scanned up to log sequence number 1 385924437
InnoDB: Last MySQL binlog file position 0 818470773, file name ./enssbos-bin.000
038
060616 21:58:21 InnoDB: Started; log sequence number 1 385924437
060616 21:58:21 [Note] Recovering after a crash using enssbos-bin
060616 21:58:21 [Note] Starting crash recovery...
060616 21:58:21 [Note] Crash recovery finished.
060616 21:58:21 [ERROR] Fatal error: Can't open and lock privilege tables: Table
'mysql.host' doesn't exist
060616 21:58:21 mysqld ended

Warning: Your Privilege Table Structure Seem To Be Older Than This MySQL Version!
I am using Yahoo's GeoCities Pro Hosting and when I get into "MyPHPadmin" to view my databases I get the following message.

Warning: Your privilege table structure seem to be older than this MySQL version!
Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!

How can I get to the script?? Can't find it.

Fatal Error: Can't Open Privilege Tables: Table 'mysql.host' Doesn't Exist
When I start the MySQL server it gets stopped immediately logging the following error.
050607 15:27:43 InnoDB: Started
050607 15:27:43 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist
050607 15:27:43 Aborting

050607 15:27:43 InnoDB: Starting shutdown...
050607 15:27:45 InnoDB: Shutdown completed

How Do I Get System Date
I have a Timestamp which shows the Date and Time. I would like to change it to just show the Date. How do I do this using phpMyAdmin?

Getting System Date
I was wondering how to set up table to column to get the system date for a date stamp. Could someone help me with this.

I tried
date date SYSDATE

with no luck

Best Way To Set Up Membership System
My site will have users that sign up and can then become part of multiple groups (think similar to Yahoo Groups or something like that). How would be the best way to set up the database/table structure so queries could be run to find both all the groups that a user is a member of and also get membership lists for each individual group?

System Tables?
Is there documentation on the system tables? I couldn't seem to find anything when I did a search on system tables.

I know about the information schema, but I want to know about the tables the information schema uses to build the views it contains.

Registration System
I have my database and HTML forms made. When I click submit to submit the registration it doesnt go to to the database it comes to a page with all of my database stuff on it. Can someone help? I have the page register.html made with the forms on it. When you click on submit its supposed to go to register.php which will send the info to the database. But is doesnt. Here is the register.php code:

System Tables
When I create a new DB it's empty. Are there a base set of system tables / functions and so forth created?

System Log For Triggers
Is there a system log file which can be checked to see the histroy of triggers. I am trying to debug a trigger that is not executing when it should.


Rating System
i want to do a rating system like youtube's where it averages out the total ratings. i'd store each of the ratings per each row and have them seperated by comma's then in my code put them in to an array.

i also wanted to store the usernames of the voters in the database in the same fashion (without displaying them though) as above say instead of using cookies (as they can be deleted). would method this be feasible? or would this say overload the database and cause slow down?

Booking System
Hi, does anyone know of a site (tutorialised / open source) that offers a PHP-MySQL Online Booking System (similar to a Hotel Booking System)

System Variable
i am connected to the server and
i build some tables etc etc. everything is fine.

i run the command "show variables". it executes fine and shows me the values
of all the variables on the server. now if i try and change the value of the
variable tmpdir using the set command, it tells me unknown "error 1193:
system variable tmpdir". help needed here........

another point, the variable "tmpdir", points to the dir c:/windows/temp. i
put a text file in that dir and try to load some data from that file into a
table, and i get an error "file not found".

Ranking System
I've made a forum and i want to have a ranking system with it. I managed to display a postcount but i also want a few images to be displayed, like if you have made more then 50 posts, it displays 50.jpg or something, how can i accomplish this, in another way then just str_replace()ing all the number of posts?
And how do i display 2, like if you have 50 posts, 50.jpg and if you have 60 posts, 60.jpg.

System Variable.
i am running mysql version 4.0.16-nt. now, i am connected to the server and
i build some tables etc etc. everything is fine.

i run the command "show variables". it executes fine and shows me the values
of all the variables on the server. now if i try and change the value of the
variable tmpdir using the set command, it tells me unknown "error 1193:
system variable tmpdir". help needed here........

another point, the variable "tmpdir", points to the dir c:/windows/temp. i
put a text file in that dir and try to load some data from that file into a
table, and i get an error "file not found".

System.OutOfMemoryException
sql 2 error: Exception of type 'System.OutOfMemoryException' was thrown.

this is the error I am getting using Mysql connect and Visual Studio.

My program is set on a loop and after the program has opened and closed around a million connections in my error logs i see this error about 80 or 90 times then it gives me a timeout error until I stop the loop. If i try to restart it it will continue to fail unless I restart the computer containing the database. Does anyone know what is causing this or how I can fix it?



Edited 1 time(s). Last edit at 07/18/2007 12:39PM by Joe Gates.

Voting System
***********************
| game_id | discussion_id |
***********************

SELECT game_id, discussion_id, count( * ) FROM `games_voting` AS votes
GROUP BY votes.game_id, votes.discussion_id


using the above query to generate a count of votes grouped by game and then user who got the votes
right now it returns all the users that received votes for each game, i'd like to only receive the user with the top vote count

Scoring System
Im sure some of you have come across 'neave' games?

The scoring system is setup as below:
CREATE TABLE games_pacman (
name VARCHAR(20) PRIMARY KEY NOT NULL,
score INT(11) DEFAULT '0' NOT NULL,
ip VARCHAR(15)
);

CREATE TABLE games_banned_ip (
ip VARCHAR(15) PRIMARY KEY NOT NULL
);

Clearly, it is possible to ban ip addresses from using the score system.

But, can anyone tell me please if it is possible to set it up to ban certain names from being used?

System Configuration
I'm currently rebuilding my home system - a couple of linux boxes with Debian.
Although I don't have a high load on any of my systems, I am going to set up a separate box with my mail server and another for my web services. I'm wondering if there is an arguement for or against putting MySQL over on the mail box or even putting it on its own box?Assuming the arguement is for putting MySQL on a different box, are there any pitfalls, tips, tricks I should consider before starting this project?

Heavy Traffic System
I am developing a very heavy traffic site. It may happen that at same time (exactly same) two user will try to register with the same username. What will be the approach to prevent this situation. Which user will be able to register and which one will be denied? Do I need to use any locking facility? If so is it a wise decision to lock entire table?

How To Get Today System Date?
Can anyone tell me how to fire a query in MySQL to get todays system Date.
I want to Subtract yesterday's date from Today's date.I want to check that if todays date is greater than yesterdays date i have to delete yesterdays date.

What Is The Best Content Managment System?
I'd like to speed up queries of the form...

SELECT ... WHERE lower(mytable.name)=?

...by using an index.

Online Booking System
Im working on a dog walking site for my girlfriend and she wants to have an online booking system for walks.

Can i use MySQL & PHP to create this or is the a language more suited to this form of application.

Song Request System
I'm new to MySQL and have been racking my brains at this for hours, studying the MySQL documentation, etc, and have given up.

All I want is some form of PHP/MySQL integration on my website that allows visitors to Reuqest Songs, and my DJ's be able to view all the reuqests in a page.

It'd just involve adding values to a database (song name and song title) then getting a page to query them out and display them again.

Would someone be so kind to write me a very very basic script that will do what I require?

Standardized Naming System ?
is there a common naming system for db objects ?

Like:

1) Tables: mytable, tblmytable, tbl_mytable

2) Indices: idx_anindex

3) Columns: int_somenumber, date_lastupdate

4) id for the numerical primary key e.g. table customers.id
and then for referencing foreign keys
table addresses : addresses.customer_id or addresses.customer_fk

OK, I know I could name them the way I want but perhaps there is some
kind of common sense in this regard ?

System Variable Tx_isolation
The System Variable tx_isolation is used for what? What this actually means,

Development Server

System Variable Value
tx_isolation READ-COMMITTED

Production Server
trx_isolation REPEATABLE-READ

What will be the difference between these two thing?

System Requirements Of MySQL
I need minimum system requirements for installing MySQL server. This is for
service definition. Please provide me the info/link from where I can get the
info.

Recommended System Specs?
I was wondering if anybody could point me to any documentation or could suggest some info on a small MySQL server that I'm setting up.

This will be running Windows and IIS (i know, i know) and be for a maximum of 20 users; nothing special.

Any suggestions for processor and RAM or things to look out for? It will be running the MySQL Community Server 5.0.

How Do I Set Up My System As A Testing Server
I work on a Windows XP Pro. Platform and I am having trouble setting my system up as a Testing Server for PHP pages. I want to be able to test scripts and build my database. I tried downloading and installing MYSQL and PHP but it still does not work. Is there some kind of Configuration I need to do in the PHP.ini file?

System Error 1067
I am just starting mysql and when I go to "net start mysql" I receive this System Error 1067, and that the system could be not started.


Copyright © 2005-08 www.BigResource.com, All rights reserved