Irish SEO,  Marketing & Webmaster Discussion

 
Affiliates get Paid On Results, Click Here!

Installing a mysql DB via SSH

This is a discussion on Installing a mysql DB via SSH within the Server / Technical Administration Tips and Queries forums, part of the Webmaster Help category; Hi guys, I have a SSH session open on my VPS. I have cd'd into the httpdocs folder in which ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Server / Technical Administration Tips and Queries

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 16-08-2008, 06:01 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,247
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to behold
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default Installing a mysql DB via SSH

Hi guys,
I have a SSH session open on my VPS. I have cd'd into the httpdocs folder in which I have placed a file called db.sql. I have created a DB via my control panel with the necessary username and password.

I'm running this command:
mysql -u DBusername -p DBpassword DBname < db.sql

But I'm getting an error stating "command not found". What am I doing wrong?
__________________
blog | Geansaí Gorm - Written entirely in, awful, Irish! | Me on Blue Jumpers
*
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 16-08-2008, 06:50 PM
blacknight's Avatar
Web Slave
Recent Blog:
 
Join Date: Jan 2006
Location: Ireland
Posts: 6,521
blacknight is a splendid one to beholdblacknight is a splendid one to beholdblacknight is a splendid one to beholdblacknight is a splendid one to beholdblacknight is a splendid one to beholdblacknight is a splendid one to beholdblacknight is a splendid one to behold
Send a message via ICQ to blacknight Send a message via AIM to blacknight Send a message via MSN to blacknight
Default

Is the command "mysql" in your path?
ie. if you start typing mysql and hit the tab key, does it autocomplete?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 16-08-2008, 07:16 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,247
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to behold
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

No, the command mysql isn't in the path.
After looking into SSH further it seems that I have to be in the mysql directory in order to run the command (makes sense now of course!) but I can't actually find the mysql directory.

Quote:
if you start typing mysql and hit the tab key, does it autocomplete?
No.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 16-08-2008, 07:22 PM
Frontpage User
 
Join Date: Jun 2008
Posts: 7
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
shortword will become famous soon enough
Default

Cormac,

Is that a plesk vps? Are you loggin in as a user or as root?

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 16-08-2008, 07:30 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,247
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to behold
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

Hi Paul,
I'm logged in as a user with /bin/bash (chrooted) access on Plesk.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 16-08-2008, 07:32 PM
Frontpage User
 
Join Date: Jun 2008
Posts: 7
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
shortword will become famous soon enough
Default

Thats the problem then, mysql isn't included in the chrooted environment.

If you pop on as root it'll work just fine.

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 16-08-2008, 07:51 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,247
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to behold
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

When you say root do you mean the root account of the server or a root account relating to the specific domain? I have logged in as the root of the server but then I am clueless as to do next. I'm not sure how I navigate to the msql directory from there.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 16-08-2008, 08:25 PM
Frontpage User
 
Join Date: Jun 2008
Posts: 7
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
shortword will become famous soon enough
Default

You don't need to navigate anywhere :-)

Simply run the command from your first post and it should be fine.

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 16-08-2008, 09:04 PM
Cormac's Avatar
Cormac Moylan
 
Join Date: Jan 2006
Location: Baile Ath Cliath / Corcaigh
Posts: 1,247
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Cormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to beholdCormac is a splendid one to behold
Send a message via AIM to Cormac Send a message via MSN to Cormac Send a message via Yahoo to Cormac Send a message via Skype™ to Cormac
Default

Mmm, when I login and run the command mysql -u DBuser -p DBpass DBname < blog.sql

I get the error -bash: blog.sql: No such file or directory

That's why I thought I might need to be in the httpdocs root or a similar dir to run the command successfully.

(thanks for the help btw)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10 (permalink)  
Old 16-08-2008, 09:10 PM
Frontpage User
 
Join Date: Jun 2008
Posts: 7
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
shortword will become famous soon enough
Default

Well, I was going to mention that :-)

You can give the full path to the file if you like. I _think_ the vhosts are in /var/www/vhosts/ but I can't recall.

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
installing, mysql, ssh

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Analytics - Installing UTM tracking code? Wenlock Search Engine Optimisation 1 19-07-2008 11:16 AM
Installing Ubuntu TheMenace Desktop Computer Issues 4 23-11-2007 02:35 PM
Installing ISAPI Rewrite glengara Server / Technical Administration Tips and Queries 4 01-10-2007 11:38 AM
Installing MySQL on Mac? ButtermilkJack Coding Help 6 25-01-2007 09:46 PM
Installing a Web Mail Client Cormac Server / Technical Administration Tips and Queries 10 18-08-2006 04:51 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 11:59 AM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0