Find the answer to your Linux question:
Results 1 to 8 of 8
Instead of having to put the root user/password inside the applications using the MySQL database (like phpMyAdmin, mtblog etc) (which I consider to be a little unsecure), I would want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2003
    Location
    /var/www/
    Posts
    23

    Making a mysql 'user'


    Instead of having to put the root user/password inside the applications using the MySQL database (like phpMyAdmin, mtblog etc) (which I consider to be a little unsecure), I would want to make an own MySQL user.

    Is this possible? How do I do this, what rights does it need, and what group? An own MySQL group?

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    If you mean a user inside the MySQL system, it doesn't need a UNIX user at all. MySQL users are in no way related to UNIX users. This is much more thoroughly documented in the MySQL documentation (see http://www.mysql.com/, look up the documentation and see section 4 of it) than I can ever hope of writing here.

  3. #3
    Just Joined!
    Join Date
    May 2003
    Location
    /var/www/
    Posts
    23
    Beats me.

    I just need a user I can add to the applications that allow it to access the MySQL bases.

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    How much access to what databases from which computers?

  5. #5
    Just Joined!
    Join Date
    May 2003
    Location
    /var/www/
    Posts
    23
    Quote Originally Posted by Dolda2000
    How much access to what databases from which computers?
    Ok...

    I'm running a linux box which I have installed MySQL. I'm running several applications that use the MySQL database, like phpBB and MovableType. In these applications I had to type in a username/password which has access to the MySQL database, in my case 'root'. I feel that this is a little unsecure, since there's a file with the uncrypted root password in a web directory. No one can download it, but you never know.

    How do I make a user that has access to the MySQL database, so I don't have to use the root user?

  6. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Run this MySQL command:
    Code:
    GRANT ALL ON * TO username IDENTIFIED BY 'password' WITH GRANT OPTION;

  7. #7
    Just Joined!
    Join Date
    Jun 2003
    Location
    Helsinki, Finland
    Posts
    78
    Quote Originally Posted by Dolda2000
    Run this MySQL command:
    Code:
    GRANT ALL ON * TO username IDENTIFIED BY 'password' WITH GRANT OPTION;
    Or to restrict access to a specific database
    Code:
    GRANT ALL ON dbname.* TO username IDENTIFIED BY 'password';

  8. #8
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Check out my mysql-howto on how to do this... on my site...

    regards

    Regards

    Andutt

Posting Permissions

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