SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bad MySQL Command

    This is the first time I've set up MySQL (Red Hat 7.1 / Apache 1.3) so I must have missed something. Every time I try to run a MySQL command I receive the following response:
    %: Too many arguments.

    I tried running this command:
    % /usr/sbin/groupadd mysqlgrp

    Any ideas on what I forgot to do?
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  2. #2
    SitePoint Enthusiast alnixon's Avatar
    Join Date
    May 2001
    Location
    Preston (UK)
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will guess you have the mysql server running, if not you need to run mysqld (its called that in windows anyway).
    From the look of the command line you have it doesn't look like you are running the mysql console, to run this you need to type

    mysql.exe -u {username} -p
    where username will be root for first start up.

    you should then be prompted to enter the password and then have the prompt: mysql>

    you first have to setup the root password using
    shell> mysqladmin -u root password {mypassword}

    this is how it all is in windows, I can not say for sure unix will be the same and this advice may have no relevance.
    Da Big Cheese
    --------------
    I'm not entirely sure on this, but ....
    [insert my post here]

  3. #3
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    From the responses I'm receiving, it looks like the mysql server hasn't been started. Every mysql command I issue I receive a response saying "Command not found."

    So, in dummy terms how do I go about starting the server or checking whether or not the server was started?
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  4. #4
    SitePoint Enthusiast alnixon's Avatar
    Join Date
    May 2001
    Location
    Preston (UK)
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by RKuhle
    So, in dummy terms how do I go about starting the server or checking whether or not the server was started?
    I can only speak for windows - but here is a step by step guide all from the command prompt in the mysql\bin directory:

    first start the server with this command
    mysqld

    then you set up the password with
    mysqladmin -u root password mypassword

    and then you run the console with
    mysql -u root -p

    it prompts you for the password you just set up
    and now you are ready to start querying

    if the second and third commands here don't work then the server is not running.

    sorry if the order was confusing in my last post. If that doesn't work it is different for Linux and so I'll give up.

    one last note which I just thought of incase you are new to Linux aswell is that to start an exe from the command prompt in Linux you first have to type \. or .\ (I can't remember which) so to start the server it would be \.mysqld or .\mysqld (the slash may go the other way too)

    Whatever it is you would need it infront of the other command too.

    It's been ages since I used it!
    Da Big Cheese
    --------------
    I'm not entirely sure on this, but ....
    [insert my post here]

  5. #5
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something must be batty with my MySQL installation because the server won't start up. I went to "/usr/local/mysql/bin" (which is correct from what I know) and ran the command "mysqld" and the following came back:
    mysqld: Command not found.

    Should I try reinstalling MySQL or does the problem lie elsewhere? By the way, thanks for all your help.
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  6. #6
    SitePoint Enthusiast alnixon's Avatar
    Join Date
    May 2001
    Location
    Preston (UK)
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    did you try that stuff with the \. I mentioned making the command one of the following (I can't remember)

    \.mysqld
    .\mysqld
    /.mysqld
    ./mysqld

    I have listed them in order of likeliness.

    oh - and your welcome
    Da Big Cheese
    --------------
    I'm not entirely sure on this, but ....
    [insert my post here]

  7. #7
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just listed all the contents of the bin directory and there is no program called mysqld, there are many others (mysql, mysqlaccess, mysqladmin...), but no mysqld! Am I missing it somehow or could it be somewhere else? I'll look through my other directories right now...
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  8. #8
    What's HTML?
    Join Date
    May 2001
    Location
    San Diego, CA
    Posts
    1,701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just found it in libexec. I ran it, and I got a Fatal error, then it shut it down. It gave me a message saying "read the security section of the manual to run as root".
    Ryan Kuhle - A Proud Advisor - Got Questions? Just Ask!
    Get your website started for less than $20! Click Here

  9. #9
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To run the mysql daemon on non-Windows platforms, you need to use safe_mysqld. It's in the bin directory.

    And btw, ./safe_mysqld is how you would call it within the bin directory. The others wouldn't work in the way you would expect them to.

  10. #10
    SitePoint Enthusiast alnixon's Avatar
    Join Date
    May 2001
    Location
    Preston (UK)
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I can't help anymore sorry.
    You can always try wading through theManual
    Da Big Cheese
    --------------
    I'm not entirely sure on this, but ....
    [insert my post here]


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
  •