Need to import database with phpmyadmin

I have managed to setup a server using ISPConfig 3 on Ubuntu 10.04. I have managed to create a database, but now I need to import a database to move my other site to this server. I haven't been able to access phpMyAdmin. The link from ISPConfig does not work. I searched these forums for similar threads, and while there are many questions like this one, I couldn't find a solution.

So could anyone help me access phpMyAdmin?

6 Replies

I can't help with ispconfig but you could just use mysql directly, for example: mysql -p db_name < import_dump.sql

Some distributions come with phpMyAdmin in a package in their repositories. Since I don't use Ubuntu, I don't know if it does. You can check by running the following command on your Linode:

sudo apt-get update && sudo apt-cache search phpMyAdmin

If that turns up with phpMyAdmin, do:

sudo apt-get install phpMyAdmin

If the phpMyAdmin package is named different in the apt-cache command, use that in the apt-get install command. It will download from Ubuntu's software repositories and install it. It won't install directly to your web site, so you'll have to find where it places phpMyAdmin and place it in your website, e.g. /srv/www/mysite.com/html/phpmyadmin (assuming that your web site is stored in /srv/www and your web site's files are stored in html, like on most systems, adjust that for your Linode's web site directory).

Another option is to go to phpMyAdmin's web site, download from there, and unpack the file onto your Linode where your web site's files are stored.

In Ubuntu

sudo apt-get install phpmyadmin

will work.

PHPMyAdmin is installed as part of ISPConfig install. Couldn't access it, but iml's method worked (thanks!), so it is all fine.

Now I need to know is what I need to do to upload images, or modify theme files through wordpress? I have tried chmod for public_html, and wp-content, none seems to work.

I'm not too familiar with WordPress, and modify themes is different for different sites. In general, though, most sites like that have a control panel that you can use to create and modify templates. Failing that, you can make a copy of the template and theme files and modify them in a text editor.

There are several ways to upload files. One is to setup a FTP server on your Linode, and use a regular FTP client like Filezilla. Another possibility is if WordPress has a section to upload files.

Another method is to use scp, which is copy over ssh. If you use Windows at home, you can use WinSCP, which is a GUI tool for using scp in Windows. For Linux, there are different GUI tools to do this; for KDE, Konqueror should work if you go to the location bar and type "sftp://user@yoursite.com" (no quotes, replace user with your user name on your Linode and yoursite.com with the domain name of your Linode, or the IP if you don't have a domain name). SFTP is FTP over ssh, I don't think Konqueror supports regular scp.

If you want to use a Linux or Mac command, use the following command (it's quite similar to the regular cp command):

scp /path/to/local/file user@yoursite.com:~

Replace /path/to/local/file with the file you want to copy. Replace user with your user name on your Linode. Replace yoursite.com with the domain name OR the IP address to your Linode. The colon ":" is required, along with where you want to copy the file to; the ~ is a shortcut in Linux to your user's home directory. If you have all your images in a single directory, you can add "-r" to the command:

scp -r /path/to/directory user@yoursite.com:~

thanks, that was helpful. :)

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