Koozali.org: home of the SME Server

Complete Newb needs help working with mysql

Kronus

Complete Newb needs help working with mysql
« on: April 09, 2005, 04:37:06 AM »
Ok so I've never posted on this board before and thought maybe some kind soul can help me out.  I have a complete website built and running using phptriad. It requires Mysql and Phpmyadmin. How do I transfer this website to the test sme server I have running. Now understand I am a complete newb....the reason I want to do this is basibly a speed issue. I have the phptriad running on an old 500mhz celoron machine and its taking 5-10 minutes loading some pages if more than one person on my intranet is using it at the same time. I have double checked and this is not a local network issue but rather the pc itself may be about to die. I have a nice 1.4 ghz true AMD system loaded with ram and plenty of hardrive that I have SME fully intsalled and running on. I am very certain this is very simple process and I am just missing something. The person who coded this site for me also installed the phptriad and is no longer available to help me migrate this site. If it helps this is an internal website and does not need to be viewed by the public..

so if anyone has an idea and wants to help it will definitly be appreciated

Kronus

axcairns

Complete Newb needs help working with mysql
« Reply #1 on: April 09, 2005, 07:05:10 AM »
Don't know anything about phptriad. MySQL is installed by default. There is a howto for installing phpmyadmin at http://no.longer.valid/phpwiki/index.php/phpMyAdmin

Cheers,

Allan

Kronus

Complete Newb needs help working with mysql
« Reply #2 on: April 09, 2005, 01:38:07 PM »
I guess my main problem is goin from a windows based proram to a linux server with no understanding of linux commands..I am reading the howto for phpmyadmin and it states I am to ssh into the server??? I only know of two ways into the server...via server-manager with my admin user/pass and ftp with same user/pass. I keep reading on this board people posting thing for directory et/home/whatever and I have no idea how to acces this.

axcairns

Complete Newb needs help working with mysql
« Reply #3 on: April 09, 2005, 05:59:00 PM »
No worries (been there).

I presume your desktop is Windows? Grab PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/). Run it, enter the ip of your server in the host name field, click on the SSH radio button and click on open. Enter root as the userid and your admin password as the password. This will get you to a command prompt where you can execute the commands in the howto.

Before you do the above you will need to allow ssh connections from your network. This can be done on the remote access page in the server manager.

Cheers,

Allan

DarkMirage

Complete Newb needs help working with mysql
« Reply #4 on: April 09, 2005, 09:06:14 PM »
I don't know much about phptriad either, however..

This should quick-and-dirty-ly :-) cover any linux commands you need.

Copying your website files:
Depending on the distro of the old machine, they're probably in /var/www/
Although, if it's SME it's /home/e-smith/files/ibays/<ibayname>/
You should check...

Using PuTTy on either machine would get you to a command prompt
Use the ssh command to work on the other command:
ssh <user>@<host>
(<host> can be a dns name, or an IP address)
Use scp to transfer files:
scp (-r) <localpath/localfilename> <user>@<remotehost>:<newpath/newfilename>
scp (-r) <user>@<remotehost>:<remotepath/remotefilename> <newpath/newfilename>
(-r means directory and it's content, <remotehost> can be a dns name, or an IP address)
Use chown to allow anyone to the webfiles:
chown (-R) <user>:<user> <files>
Use user www for files in ibays

So this would mean, from the new machine:
Code: [Select]
ssh root@youroldmachine
scp -r /var/www/html/* root@yournewmachine:/home/e-smith/files/ibays/Primary/html/
scp -r /var/www/cgi-bin/* root@yournewmachine:/home/e-smith/files/ibays/Primary/cgi-bin/
mysqldump yourdatabase > /mydatabase.sql
scp /mydatabase.sql root@yournewmachine:/mydatabase.sql
exit
mysql < /mydatabase.sql
chown -R www:www /home/e-smith/files/ibays/Primary/*


Note: If your using a specific ibay, replace Primary with your ibay name in the paths

Kronus

Complete Newb needs help working with mysql
« Reply #5 on: April 11, 2005, 02:20:12 PM »
thanks for all the help will try this as soon as posible. Just bought a house and this weekend and the next few days is moving time. I will post back when I have this done!

Again thanks....

Kronus

Kronus

Complete Newb needs help working with mysql
« Reply #6 on: May 03, 2005, 04:33:24 AM »
Ok I was able to install a few things including the update system rpm for the server manager. I now have phpmyadmin up and running but have come accros another problem. When I try to creat a new database I get the error #1064 - You have an error in your SQL syntax near '' at line 1

anyone have any suggestions?