SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello All
    Im using Mysql on a Win2k Server for a vBulleting forum. The database name is "midi". Currently Im using root as the login for SQL. My question is how do I change the login to something else for this database? I also of course need to change the password.

    Thanks

  2. #2
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure about NT but on Linux, just create another user using the following

    Code:
    insert into user ( Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv , Create_priv , Drop_priv, Reload_priv , Shutdown_priv ,Process_priv , File_priv , Grant_priv , References_priv , Index_priv , Alter_priv ) values ('HOSTNAME','USERNAME',password('PASSWORD'),'y' ,'y','y','y','y','y','y','y','y','y','y','y','y','y');
    Then edit the DB file using

    Code:
    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) values ('HOSTNAME','DBASENAME','USERNAME','y','y','y','y','y','y','y','y','y','y');
    Once you have done this exit mysql you will now need to reload mysql to activate the changes
    and from command line type
    Code:
    mysqladmin reload -u root -p"
    you will then be prompted for the root password

    hope this helps remember to change the y's to n's to change privalidges for each user


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •