Jump to content

Question ???


Recommended Posts

i have this code

mysql>insert into user values (
-> 'localhost'
-> 'deboo'
-> Password('password')
-> 'y','y','y','y','y','y','y',
-> 'n','n','n','n','n','n','n','n','n','n','n','n',
-> 'n','n','n','n','n','n','n','n','n','n','n');


so guys i am trying to understand this code , how many privileges does this user have , so if anyone can help please do so thx .
Link to comment
Share on other sites

Select the columns from the user table to see what they are called. Then you'll know what the previleges are that correspond to a column having a "y" in it. The answer partly depends on what version of MySQL you're using. Use a tool such as phpMyAdmin to help make things easier.

For instance, here's an example of an MySQL v4.0.20a-nt user table dumped using phpMyAdmin:

-- phpMyAdmin SQL Dump
-- version 2.6.1
-- [a href=\"http://www.phpmyadmin.net\" target=\"_blank\"]http://www.phpmyadmin.net[/a]
--
-- Host: localhost
-- Generation Time: Apr 25, 2006 at 07:41 PM
-- Server version: 4.0.20
-- PHP Version: 4.3.11
--
-- Database: `mysql`
--

-- --------------------------------------------------------

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
`Host` varchar(60) binary NOT NULL default '',
`User` varchar(16) binary NOT NULL default '',
`Password` varchar(16) binary NOT NULL default '',
`Select_priv` enum('N','Y') NOT NULL default 'N',
`Insert_priv` enum('N','Y') NOT NULL default 'N',
`Update_priv` enum('N','Y') NOT NULL default 'N',
`Delete_priv` enum('N','Y') NOT NULL default 'N',
`Create_priv` enum('N','Y') NOT NULL default 'N',
`Drop_priv` enum('N','Y') NOT NULL default 'N',
`Reload_priv` enum('N','Y') NOT NULL default 'N',
`Shutdown_priv` enum('N','Y') NOT NULL default 'N',
`Process_priv` enum('N','Y') NOT NULL default 'N',
`File_priv` enum('N','Y') NOT NULL default 'N',
`Grant_priv` enum('N','Y') NOT NULL default 'N',
`References_priv` enum('N','Y') NOT NULL default 'N',
`Index_priv` enum('N','Y') NOT NULL default 'N',
`Alter_priv` enum('N','Y') NOT NULL default 'N',
`Show_db_priv` enum('N','Y') NOT NULL default 'N',
`Super_priv` enum('N','Y') NOT NULL default 'N',
`Create_tmp_table_priv` enum('N','Y') NOT NULL default 'N',
`Lock_tables_priv` enum('N','Y') NOT NULL default 'N',
`Execute_priv` enum('N','Y') NOT NULL default 'N',
`Repl_slave_priv` enum('N','Y') NOT NULL default 'N',
`Repl_client_priv` enum('N','Y') NOT NULL default 'N',
`ssl_type` enum('','ANY','X509','SPECIFIED') NOT NULL default '',
`ssl_cipher` blob NOT NULL,
`x509_issuer` blob NOT NULL,
`x509_subject` blob NOT NULL,
`max_questions` int(11) unsigned NOT NULL default '0',
`max_updates` int(11) unsigned NOT NULL default '0',
`max_connections` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`Host`,`User`)
) TYPE=MyISAM COMMENT='Users and global privileges';

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.