Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

sql tables

jiljil Member Posts: 30
Iam totally new to SQL Data bases.
Is it that..SQL Databases have more than 1 login ID and Password..
I've been assigned an assigned in which I have to write a C++ program which checks the access permission for a particular login id and password!
what all API's are used for this job??

Comments

  • JonathanJonathan Member Posts: 2,914
    : I am totally new to SQL Data bases.
    Then be aware that what you have asked is fairly specific to MySQL, and that the following doesn't apply to other database servers.

    : Is it that..SQL Databases have more than 1 login ID and Password..
    Yes - but it's better to think of it as a user can be granted permissions on as many databases as you wish. So you can have two users which are granted permissions on the same database (but they could be different permissions, e.g. one could just be able to do SELECT queries, whereas the other had full access to do anything they wanted).

    : I've been assigned an assigned in which I have to write a C++
    : program which checks the access permission for a particular login id
    : and password!
    : what all API's are used for this job??
    There aren't any special APIs for this - MySQL actually uses it's own database engine to store data about users/passwords/permissions. They are placed in a "magic" database called mysql, and you can run queries on that just like you would with any other database. There is also MySQL syntax that is related to permissions, but all it does is query or update these tables (I suggest you always use the provided keywords if making changes).

    Hope this helps,

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

  • jiljil Member Posts: 30
    :: So you can have two users which are granted permissions on the same database (but they could be different permissions, e.g. one could just be able to do SELECT queries, whereas the other had full access to do anything they wanted).

    i have to implement this programatically! in c++!!
    how to do this..
    what are master..northwind..msdb.testdb databases that are installed when installing sql client ??

    : There aren't any special APIs for this - MySQL actually uses it's own database engine to store data about users/passwords/permissions. They are placed in a "magic" database called mysql, and you can run queries on that just like you would with any other database. There is also MySQL syntax that is related to permissions, but all it does is query or update these tables (I suggest you always use the provided keywords if making changes).

    how to access the magic databse!! mysql?
    what is that mysql syntax??

  • JonathanJonathan Member Posts: 2,914
    : :: So you can have two users which are granted permissions on the
    : :: same database (but they could be different permissions, e.g. one
    : :: could just be able to do SELECT queries, whereas the other had
    : :: full access to do anything they wanted).
    :
    : i have to implement this programatically! in c++!!
    : how to do this..
    : what are master..northwind..msdb.testdb databases that are installed
    : when installing sql client ??
    Where are the what??? You can do this in C++ - you just need the C++ library to allow you to connect to MySQL, and then you can execute the required SQL statements to do what you need.

    : : There aren't any special APIs for this - MySQL actually uses it's
    : : own database engine to store data about
    : : users/passwords/permissions. They are placed in a "magic"
    : : database called mysql, and you can run queries on that just like
    : : you would with any other database. There is also MySQL syntax
    : : that is related to permissions, but all it does is query or update
    : : these tables (I suggest you always use the provided keywords if
    : : making changes).
    :
    : how to access the magic databse!! mysql?
    You need to connect as an administrative user. You access that database just like you would any other MySQL database.

    : what is that mysql syntax??
    Read the manual.
    http://www.mysql.com/doc/en/index.html

    Jonathan

    ###
    for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
    (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
    /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Sign In or Register to comment.