Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

mySQL prob

  • 07-09-2004 7:01pm
    #1
    Registered Users, Registered Users 2 Posts: 1,771 ✭✭✭


    hi guys,

    just a quick question, somebody should be able to sort it for me, its wrecking my head at this stage!

    installed mysql no probs, set up the my.ini file in the winnt folder with the username and password set. I run the server (mysqld) then go to my command prompt and type

    mysql> mysql -u conor -p

    then enter my password, but keep gettin access denied everytime, i can't see where the problem is, ive checked the username and password countless times, theres no problem there, do i need to set special privilages or something? anyone got an ideas?

    cheers


Comments

  • Registered Users, Registered Users 2 Posts: 3,889 ✭✭✭cgarvey


    Does "mysql -u root -p" (with empty password) work? Have you set up the conor user in the mysql database? If so, have you granted him access to the desired database? If this is double dutch read the authentication chapter of the SQL manual which describes how users and privileges work.

    .cg


  • Registered Users, Registered Users 2 Posts: 1,771 ✭✭✭jebuz


    yea i can log in as root, i see wat u mean now. so how do u insert a user is it a matter of 'insert into user values("conor", "password"); or something, and how would u set his privilages, cheers


  • Registered Users, Registered Users 2 Posts: 515 ✭✭✭NeverSayDie


    You need the "GRANT" command. You use that when logged in as root to create new users and give users specific access rights. Here's the manual page for it: http://dev.mysql.com/doc/mysql/en/Adding_users.html


  • Registered Users, Registered Users 2 Posts: 3,889 ✭✭✭cgarvey


    jebuz wrote:
    yea i can log in as root, i see wat u mean now. so how do u insert a user is it a matter of 'insert into user values("conor", "password"); or something, and how would u set his privilages, cheers
    Not being smart, but read the chapter in the manual... you can use the GRANT command like NeverSayDie says, or you can do it like you say ...
    INSERT INTO user ( host, user, password ) VALUES ( 'localhost', 'conor', password( 'conorpwd' ) );
    INSERT INTO db ( host, db, user, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Create_tmp_table_priv, Lock_tables_priv ) VALUES ( '%', 'conordb', 'conor', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y' );
    flush privileges;
    

    ... but you should read the manual so that you understand the implications of doing above.

    .cg


  • Registered Users, Registered Users 2 Posts: 1,771 ✭✭✭jebuz


    ya cheers lads, got it workin fine for now


  • Advertisement
Advertisement