+ Reply to Thread
Results 1 to 7 of 7

Thread: log into sql from command line?

  1. #1
    chess314 is offline x10Hosting Member chess314 is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    5

    log into sql from command line?

    Hi,
    I know we can play with mysql from cpanel. What would be the command to get mysql access from a terminal?

    Thanks,
    kevin

  2. #2
    Russ's Avatar
    Russ is offline Retired ***** Russ is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    3,162

    Re: log into sql from command line?

    mysql -u xdomain -p -h mysql.example.org xdatabase

    where you need to replace domain with your actual domain and example.org with correct domain and .tld.

    -u is the switch to specify the user. Your MySQL username is xdomain where domain is your domain.

    -p tells MySQL to prompt for a password

    -h tells MySQL what host to use. Your host is mysql.example.org (replace with your actual domain and .tld)

    xdatabase in the above command line instruction is the name of the database.
    x10 Chat is now available! Live Support!

    DO NOT PRIVATE MESSAGE STAFF - WE ARE BUSY

  3. #3
    chess314 is offline x10Hosting Member chess314 is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    5

    Re: log into sql from command line?

    so im a little confused.
    i think my user name for the database is chess and i guess my host is my website on x10hosting which is prototype.x10hosting.com
    and my databases name is sample
    so i typed in
    mysql -u chess -p -h prototype.x10hosting.com sample

    and i get this
    ERROR 1045 (28000): Access denied for user 'chess'@'63-215-76-17.netwood.net' (using password: YES)

    the stuff after the @ is probably not what i want...whats going on?

    Thanks

  4. #4
    naim4u's Avatar
    naim4u is offline x10Hosting Member naim4u is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    51

    Re: log into sql from command line?

    your password mignt be worng orplz check the mysql server name and enter it correctly

  5. #5
    Slothie's Avatar
    Slothie is offline Lord Of The Keys Slothie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Singapore
    Posts
    1,432

    Re: log into sql from command line?

    You need to add in your IP as remote access in CPanel, by default it only allows localhost.

    Easiest 70 points you'll make on x10

    Feel free to add my reputation by clicking on the if you found my post helpful to you :P


    If I am not responding to your PMs, that means I am ignoring you. Take a hint.



    09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0


  6. #6
    chess314 is offline x10Hosting Member chess314 is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    5

    Re: log into sql from command line?

    youre probably right about cpanel, i added my ip. but for some reason the command keeps failing. this time it says:

    ERROR 1045 (28000): Access denied for user 'chess'@'cpe-76-172-84-128.socal.res.rr.com' (using password: YES)

    for some reason the hostname changed....isnt the host name supposed to be the name of my website i made on x10hosting?
    Edit:
    can someone tell me what the host is anyway? is that the name of my computer? or the name of the computer the slq server is on?

    Thanks
    Last edited by chess314; 12-12-2007 at 02:06 PM. Reason: Automerged Doublepost

  7. #7
    El Jefe is offline x10Hosting Member El Jefe is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    1

    Re: log into sql from command line?

    im trying log in via the command-line (dont like myPHP much) and i think i followed the above instructions right but im getting

    ERROR 2003 (HY000): Can't connect to MySQL server on 'dancetest.x10hosting.com' (10061)
    or
    ERROR 2003 (HY000): Can't connect to MySQL server on 'mysql.x10hosting.com' (10061)

    my command line looks something like this

    mysql -u test -p -h dancetest.x10hosting.com test

    ive tried lots of different variations as im not 100% sure of the above instructions, but ive tried

    mysql -u test -p -h mysql.x10hosting.com test
    mysql -u username_test -p -h mysql.x10hosting.com username_test
    mysql -u username_test -p -h dancetest.x10hosting.com username_test
    etc...

    but still ERROR 2003...

    im sure im just an idiot, but any help would be appreciated

+ Reply to Thread

Similar Threads

  1. Why is my site down?/ sql problem
    By galaxyAbstractor in forum Free Hosting
    Replies: 4
    Last Post: 10-22-2007, 02:01 PM
  2. Sql
    By niahossain in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 10-17-2007, 07:17 PM
  3. sql backup/restore
    By darkjetx in forum Free Hosting
    Replies: 6
    Last Post: 11-12-2005, 06:50 AM
  4. SQL Help
    By Shadow in forum Free Hosting
    Replies: 11
    Last Post: 04-04-2005, 01:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers