Anyone know how to creat mysql databses and users through ssh?

Discussion in 'Site & Server Administration' started by bikerjeg, Feb 24, 2007.

  1. #1
    Dont know if this is the best place to put this. But I am new to vps and I am looking to install a forum for one of my sites. The thing is the site is not running through cpanel so I cant simply use the admin tool through cpanel to create the databases. What I have access through virtuosso is their ssh tool. So if someone knows the commands to use for this please let me know. If anyone wants to help with this pm me and we can work out a prise for the service.
     
    bikerjeg, Feb 24, 2007 IP
  2. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Free Webmin control panel would have made it easy.

    Though there are tutes for common mysql commands, currently I'm unable to link to some.
     
    agnivo007, Feb 25, 2007 IP
  3. tanfwc

    tanfwc Peon

    Messages:
    579
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think it is better to hire someone to create such things for you. Any mistake can cause your database crashing down :D
     
    tanfwc, Feb 25, 2007 IP
  4. Sini

    Sini Peon

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    First login to your mysql console using command:

    #mysql -u root -p

    you will have to enter your password next, hit return (enter) after you have given your password

    next, create the database by using command (replace [databasename] with name of the new database:

    create database [databasename];

    hit return

    next create and attach a new user to your database by using command, replace [database] with the name of the database you just created, [databaseusername] with a name you want for the user, [host] with host (usually localhost), [password] with password you want to use:

    grant all on [databasename].* to [databaseusername]@[host] identified by '[password]';

    hit return

    exit from mysql by typing: exit
     
    Sini, Feb 25, 2007 IP
  5. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yep...thats the way.

    But I guess if you had installed free webmin on your vps, it'd have been really good. The vps support team does that for free generally.
     
    agnivo007, Feb 25, 2007 IP
  6. tespio

    tespio Peon

    Messages:
    16
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Well .. to create it directly from console you can use the other MYSQL provided binaries like:
    mysqladmin
    mysqldump
    etc
     
    tespio, Feb 26, 2007 IP