login community faq

There's a great post on compiling a private MySQL installation here.

Now how can I properly install phpMyAdmin and link it to it? I don't seem to find a decent step-by-step on the web.

Some tips on creating, uploading and managing databases via SSH would be also welcome.

Thanks!

asked Sep 25 '12 at 14:01

uresende's gravatar image

uresende
11


To install phpMyAdmin:

  1. Create a new static/cgi/php application and connect it to a website.
  2. SSH into your server and run the following commands to download and extract PMA:
    cd ~
    wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/3.5.2.2/phpMyAdmin-3.5.2.2-english.tar.bz2?r=http%3A%2F%2Fwww.phpmyadmin.net%2Fhome_page%2Fdownloads.php&ts=1348609141&use_mirror=freefr"
    cd ~/webapps/name_of_app
    tar jxf ~/phpMyAdmin-3.5.2.2-english.tar.bz2 --strip 1
    mkdir config
    
  3. Go to http://url_of_the_site/setup/ in your browser.
  4. Click "New server".
  5. Enter a friendly name for the new server.
  6. Enter localhost as the server hostname.
  7. Enter your MySQL app's assigned port.
  8. Enter the full path to your MySQL app's socket.
  9. Check Use SSL if you're accessing the site via HTTPS.
  10. Select socket as the connection type.
  11. Click Save to save the server.
  12. Under Configuration file, click Save to save your config.
  13. Back in your SSH session, run the following commands:
    cd ~/webapps/name_of_app
    mv config/config.inc.php ./
    rm -rf config
    echo "deny from all" > setup/.htaccess

At that point, phpMyAdmin should be available at the site you created in the first step.

Database management at the command line is done with the normal MySQL command line utilities, using options to point them at your private MySQL. For example, to create a database named "my_db":

1
mysqladmin -S ~/webapps/ms/var/mysql.sock -u root -p create my_db

Your can run "mysqladmin --help" and "man mysqladmin" in a SSH session for more information, or consult the MySQL documentation.

Hope that helps!

answered Sep 25 '12 at 17:07

seanf's gravatar image

seanf ♦♦
56541220

Sean, I should have mentioned that I run my private Nginx+PHP-FPM stack - sorry. I assume the steps are a bit different in this case, am I right?

Also, do I need to install a different PMA for every app served by my stack?

(Sep 25 '12 at 18:11) uresende uresende's gravatar image

Sean, I should have mentioned that I run my private Nginx+PHP-FPM stack - sorry. I assume the steps are a bit different in this case, am I right?

Sure, if you want to run PMA on your custom stack, then you'd need to do it differently.

Also, do I need to install a different PMA for every app served by my stack?

Everything I know about configuring PMA, I learned earlier today when I wrote that answer. I guess that if you're running multiple MySQL instances, then you'd probably need a separate PMA for each of them, but I don't know for sure.

(Sep 25 '12 at 18:27) seanf ♦♦ seanf's gravatar image

sorry about point 8 how I get it? ty

(Mar 13 at 05:14) Dariongp Dariongp's gravatar image

also I get "#1045 Cannot log in to the MySQL server"

any idea?

(Mar 13 at 05:27) Dariongp Dariongp's gravatar image

sorry about point 8 how I get it? ty

If you've installed a private MySQL instance via our control panel, the socket path is /home/<your_username>/webapps/<app_name>/var/mysql.sock

also I get "#1045 Cannot log in to the MySQL server"

any idea?

That could be caused by any number of problems in your PMA config. Check that you're using the correct port, socket, hostname, username, password, etc. If you're not sure, then please open a support ticket and we'll take a closer look.

(Mar 13 at 17:52) seanf ♦♦ seanf's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×116
×37
×15

Asked: Sep 25 '12 at 14:01

Seen: 493 times

Last updated: Mar 13 at 17:52

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited