Access mysql without a Control Panel?

Discussion in 'Site & Server Administration' started by crazyhorse, Feb 4, 2005.

  1. #1
    Is there anyone that can point me out what tool to use to easily access my mysql database. The site does support SSH , doesnt have phpmyadmin. I dont feel like installing phpmyadmin first on my ftp client isnt there a easier way to acess the database.
     
    crazyhorse, Feb 4, 2005 IP
  2. dkalweit

    dkalweit Well-Known Member

    Messages:
    520
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    150
    #2
    The mysql binary will give you a SQL command line to the database. It might be in your path. Otherwise, find where mysql is installed("locate mysql"), and then there's a "bin" sub directory. For example, on my system, it's /usr/local/mysql/bin/mysql, so I issue:

    /usr/local/mysql/bin/mysql -p mydatabasename

    "-p" forces it to ask for a password, and "mydatabasename" is the name of my database.

    Good luck.


    --
    Derek
     
    dkalweit, Feb 4, 2005 IP
  3. Agent47

    Agent47 Well-Known Member

    Messages:
    775
    Likes Received:
    138
    Best Answers:
    0
    Trophy Points:
    135
    #3
    Do you know the address of your MySql Server? it might be an IP address or something similar. Use EMS MySQL Manager to connect to your Mysql Server and manage your database. Download the trial version and you are all set.

    Cheers,
     
    Agent47, Feb 4, 2005 IP
  4. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just install phpmyadmin. It's as easy as dumping it in a directory on your webserver. or for that matter, install apache, php and phpmyadmin at home and manage your mysql server from there.
     
    exam, Feb 4, 2005 IP
  5. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    A useful thing about mysql (the utility, not the database) if the output is too wide for the command line, use \G instead of semicolon:

    select * from user\G

    J.D.
     
    J.D., Feb 4, 2005 IP
  6. dkalweit

    dkalweit Well-Known Member

    Messages:
    520
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    150
    #6
    That's an awesome tip. Thanks!


    --
    Derek
     
    dkalweit, Feb 4, 2005 IP
  7. mushroom

    mushroom Peon

    Messages:
    369
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you have command line access from your computer (with out prior arrangement) as suggested in other posts.

    MOVE

    Don't just walk away from your host RUN
     
    mushroom, Feb 4, 2005 IP
  8. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thanks for the info
     
    crazyhorse, Feb 5, 2005 IP
  9. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Care to elaborate?

    J.D.
     
    J.D., Feb 6, 2005 IP
  10. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #10
    would this work?
    1. download mysql control center
    2. install it on your local workstation
    3. connect to your server
    4. access your database through mysql control center

    i've not tried this out... there may be problems connecting to the webserver...
     
    daboss, Feb 6, 2005 IP
  11. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #11
    One thing to keep in mind is that it is always a bad idea to open MySQL ports in the firewall. It opens too many possibilities for hackers to poke at the server. In a proper configuration, MySQL admin would connect to the machine through some other mechanism (e.g. ssh, tunnel, web, etc) and connect to the server locally.

    Another security concern is that if your server is shared and you can run the mysql utility at any time, this means that other folks on the same server can do the same (sometimes they can even upload better tools for this) and that they can also poke the server trying to get to other people's databases.

    J.D.
     
    J.D., Feb 6, 2005 IP
  12. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Normally the database server would only be accessible from the webserver machine, not from the internet.
     
    exam, Feb 6, 2005 IP
  13. flawebworks

    flawebworks Tech Services

    Messages:
    991
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    78
    #13
    In some cases; you can allow remote access; as long as the host knows to allow the ip.
     
    flawebworks, Feb 6, 2005 IP
  14. mushroom

    mushroom Peon

    Messages:
    369
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Any host that dose not provide safe secure tools for its customers to use is either incompetent or dose not care about it's customers needs.

    Nornmal security protocol is for only root to have command line access, as it is much easyer to breakin and take total control of a server from the inside.
     
    mushroom, Feb 6, 2005 IP
  15. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Any one care to help me out i cant it working. Maybe a pm. Thanks in advance
     
    crazyhorse, Feb 7, 2005 IP
  16. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #16
    What's the problem? You can PM me, if you'd like.

    J.D.
     
    J.D., Feb 7, 2005 IP
  17. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I got it working, i was a bit to fast. I have downloaded putty from here, http://www.chiark.greenend.org.uk/~sgtatham/putty/ for easy ssh access.

    Im going to use there mysql monitor
    /usr/local/mysql/bin/mysql -u loginname -h servername -p databasename [Enter]

    or there webinterface
    http://www.widexs.nl/examples/mysql.tar.gz Havnt checked the file yet might be in Dutch .

    Using the commands like

    cd /opt/guide/www.yourdomain.nl/HTML [Enter]
    tar xvfz mysql.tar.gz [Enter]

    cd /opt/guide/www.yourdomain.nl/HTML [Enter]
    chown -R username:user mysql [Enter]
    chmod -R 755 mysql [Enter]

    Thought that was quit a good start for a newbie?
     
    crazyhorse, Feb 7, 2005 IP
  18. crazyhorse

    crazyhorse Peon

    Messages:
    1,137
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Thanks for the offer i forgot to say :D
     
    crazyhorse, Feb 7, 2005 IP
  19. neterslandreau

    neterslandreau Peon

    Messages:
    279
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #19
    That is a very good tip. Thanks J.D.
     
    neterslandreau, Feb 11, 2005 IP