#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0

    Unable to set Passwords during mysql install


    Trying to install mysql on SolusOS following Mysql instructions I cannot follow the instruction Select User, Host, Password, FROM mysql.user;
    At this point the system reports cannot find SELECT.
    Now Im trying to install from source but it's the same problem using a debian install or generic linux.
    Any ideas on how to progress beyond this point?
  2. #2
  3. No Profile Picture
    Problem Solver
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2001
    Location
    Stockholm, Sweden
    Posts
    4,495
    Rep Power
    534
    At this point the system reports cannot find SELECT.
    Are you by any chance trying to run the SELECT query directly in the shell?

    You need to start the mysql client to be able to run queries.

    PS: Some more information in the question with copy and pasted error message etc makes our answers much less of a guessing game.
    /Stefan
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0

    More Info


    Thank you for your reply Stefan and my humble apoligies for not giving enough information.
    As stated i'm installing from source and following the recipe of the Mysql Procedure. I follow the build instructions and arrive at section 2.10.1 without errors. The Postinstallation procedures runs correctly from point 7 until point 13 inclusive at which I switch to (as stated) section 2.10.2 to display the accounts in the mysql.user table.
    The code to be entered is:
    SELECT User, Host, Password FROM mysql.user
    Reply: cannot find SELECT
    Your reference to Mysql Instructions under section 4.5 are perhaps too advanced because I'm already struggling under section 2.
    Thanks again.
  6. #4
  7. No Profile Picture
    Problem Solver
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2001
    Location
    Stockholm, Sweden
    Posts
    4,495
    Rep Power
    534
    Originally Posted by Haricott
    Your reference to Mysql Instructions under section 4.5 are perhaps too advanced because I'm already struggling under section 2.
    Yes but that is what you need to do.

    Since I'm guessing that the instruction that you are struggling with is:
    Originally Posted by TheManual
    To display which accounts exist in the mysql.user table and check whether their passwords are empty, use the following statement:

    mysql> SELECT User, Host, Password FROM mysql.user;
    At http://dev.mysql.com/doc/refman/5.6/...rivileges.html.

    Notice the prompt that is bold above.
    That tells you that you need to perform the query inside the mysql command line client and not in the shell.

    So in the shell you first need to run:
    Code:
    shell> mysql
    Which hopefully will open a connection to the database (depending on how the default passwords are set up).

    Then you will get a new prompt inside the mysql application where you can run SELECT like this:
    Code:
    mysql> SELECT User, Host, Password FROM mysql.user;
    And then you can write:
    exit;
    to end the mysql command line.
    /Stefan
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0
    Thank you for your help.
    I took your advice and entered bin/mysql -e "SELECT User, Host, Password FROM mysql.user" and got a similar table to that shown in the Mysql instructions; taking inspiration from the instruction above.
    I'll continue with password setting and hopefully achieve a viable database system.
    Thanks again.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,400
    Rep Power
    1688
    A small word of warning ... if the command you entered was, literally, bin/mysqld (plus the parameters) that would only work if you were in the directory beneath the bin directory as it is a 'relative path'. You may not need to specify the bin/ part - try the command which mysqld. If that comes back with a result it implies that the directory is in your PATH and you can just type mysqld (plus parameters).
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0
    I appreciate the warning Simon, and its the next thing to do to make sure of finding the database without having to be in the directory as you pointed out. But you lost me with the code "which mysqld" cos I'm just starting to work through the documentatation. Maybe section 3 , tutorial, will help.

IMN logo majestic logo threadwatch logo seochat tools logo