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

    Join Date
    Jan 2000
    Posts
    108
    Rep Power
    15
    Hello.
    I have a server running on an ISP. I am attempting to add mysql, for which I am using F-Secure SSH as the client program for the Macintosh. After I connect via SSH, I try to get into mysql. I am given the prompt:
    [datera@host datera]$
    Where I enter
    mysql -u datera -p
    This returns the error:
    bash: mysql: command not found
    If I enter
    function mysql -u datera -p
    The telenet returns:
    bash: syntax error near unexpected token `-u'
    If I enter
    function mysql
    I recieve this
    >
    And I get the same error as stated above.

    Can someone tell me how to access mysql?? The username I use is datera. Thank you.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Hi,

    Following may work for you


    mysql -h host -u username -p

    then enter your password..




    [This message has been edited by Shiju Rajan (edited March 15, 2000).]
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Annapolis, Maryland US
    Posts
    113
    Rep Power
    16
    Another possibility is that mysql is not in your $PATH. Type 'which mysql' at the command prompt to see if it is part of your $PATH. If not, you'll either have to update your login profile or use something like %/usr/local/bin/mysql -u root -p (or wherever mysql is located) at the command prompt to connect to the server...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    108
    Rep Power
    15
    I'm sorry. I still cannot connect with BASH telenet. I tried 'which mysql', got this:

    [datera@host datera]$ which mysql (then)
    [datera@host datera]$

    tried, and got:

    [datera@host datera]$ mysql -h host -u username -p
    bash: mysql: command not found

    Should I use text, not "username" and "host"?
    For example, if the username should be "datera" and the password "apass", should it be:

    [datera@host datera]$ mysql -h host -u datera -p

    Thank you. http://www.datera.com
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Annapolis, Maryland US
    Posts
    113
    Rep Power
    16
    1. Find out where MySQL is on the server, for example /usr/local/bin/mysql

    2. Once you have figured out where it is located, type the following at the command prompt:

    /usr/local/bin/mysql -u username -p

    (of course, substitute your username for 'username')

    If everything is jiving, then mysql should prompt you for a password.

    3. Somehow, someway change your $PATH to reflect the location of mysql, so all you will have to do is type mysql -u username -p at the command prompt to access the server
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    6
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Kyuzo:
    3. Somehow, someway change your $PATH to reflect the location of mysql, so all you will have to do is type mysql -u username -p at the command prompt to access the server[/quote]

    Depending in unix OS your ISP is running, you could try commands like "whereis mysql" and "locate mysql" (no quotes) to get a list of possible locations of the mysql binary (usually, th path will have "/bin/" in is somewhere...)

    ------------------
    -Erik
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    British Columbia
    Posts
    11
    Rep Power
    0
    don't forget that with the -u there is NO space between the u and the username. Also, if the ISP`s operating system is UNIX, it sometimes helps to put ./ in front of the mysql command to make sure that it's looking in the right place for the executable `mysql'

    For username yoshi, it would be
    ./mysql -uyoshi etc
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    1
    Rep Power
    0
    This sounds as though mysql in not installed.


    ------------------
    http://www.theukmall.co.uk

Similar Threads

  1. Connecting to remote MySQL database
    By jalberts in forum Delphi Programming
    Replies: 4
    Last Post: November 24th, 2004, 06:05 AM
  2. Connecting MYSQL using ASP
    By alx_81 in forum MySQL Help
    Replies: 2
    Last Post: September 20th, 2003, 04:10 AM
  3. connecting to mysql on local computer
    By Helaman in forum PHP Development
    Replies: 2
    Last Post: July 11th, 2003, 05:38 PM
  4. connecting to mysql database in NT
    By davc in forum MySQL Help
    Replies: 1
    Last Post: May 10th, 2002, 12:53 PM
  5. connecting Access with MySQL
    By tgelston in forum MySQL Help
    Replies: 2
    Last Post: July 8th, 2001, 02:22 AM

IMN logo majestic logo threadwatch logo seochat tools logo