Import mysql

Ok I now have linode 512 with lam but not the p installed.

I uploaded my databases to ~/public/example.com/public

I then use the command "mysql -u username -ppassword database_name < FILE.sql"

This is a copy and past from docs.

Anyway I get "No such file or directory"

I installed mysqladmin but I guess it has no gui?

And should -ppassword be "-p password" I tried that too.

Where am I going wrong?

6 Replies

Hi, if you're getting "No such file or directory" then the database file is not in your current directory. Use pwd to see the current directory, and ls to see the files in it.

You may wish to simply specify the full path to the database file, which (if I understand) would mean that you would use:

mysql -u username -ppassword database_name < ~/public/example.com/public/FILE.sql

Hope this might help…

Thanks John,

You got me out of the rut I was in.

I'm now transferring files. Which will take some time.

I sure miss being able to see the tables in the database like with cpanel.

Is there not a gui for the databases? Bet you can't tell I'm new.

David

'show tables' will show a list of tables in a given database. However, take a look at MySQL Workbench… it's pretty handy.

@mmcsus:

Is there not a gui for the databases? Bet you can't tell I'm new.

David

I usually install phpMyAdmin:

http://www.phpmyadmin.net/home_page/index.php

It's a bit weird the way you configure it but once it's running it's fine. You will want to make sure that no-one else can get into it… I put it in a separate virtual host and only allow access from one IP address.

@JohnR:

I usually install phpMyAdmin:
I usually laugh at people who install phpMyAdmin :roll:

Just kidding @John R - but phpMyAdmin is for sissies and people who can't type two letters without one of them being backspace.

It's usually setup WRONG, and becomes a HUGE security risk.

Use HeidiSQL or Sqlyog.

Both tons more secure then phpmyadmin, and way better featured (ymmv).

If you're using a mac Sequel pro is pretty good and free

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct