Difference between revisions of "User:Saul/notes"
From Organic Design wiki
(MySQL info page made!!!) |
|||
Line 1: | Line 1: | ||
− | MySQL notes | + | == MySQL notes == |
− | connecting to MySQL, | + | connecting to MySQL, |
− | -u USERNAME -p | + | |
− | (change USERNAME to whatever you put as your user name when setting up mySQL) | + | -u USERNAME -p |
− | then type your password. | + | |
− | + | (change USERNAME to whatever you put as your user name when setting up mySQL) | |
− | exporting a file in mySQL, | + | |
− | mysqldump -u USERNAME -p DATABASENAME > FILENAME.sql | + | then type your password. |
− | (change USERNAME,DATABASENAME and FILENAME to what there supposed to be!) | + | |
− | + | ||
− | setting up localhost | + | exporting a file in mySQL, |
− | (you need to be in root and it will ask you about the mySQL user name and password make sure you remember them) | + | |
− | apt-get install php5-mysql | + | mysqldump -u USERNAME -p DATABASENAME > FILENAME.sql |
− | apt-get install mysql-server | + | |
− | apt-get install apache2 | + | (change USERNAME,DATABASENAME and FILENAME to what there supposed to be!) |
− | cd /var/www | + | |
− | mv index.html index-old.html< | + | |
− | + | == setting up localhost == | |
− | + | ||
− | Then you go to localhost in your browser and if it comes up with a php page saying lots of info of your version it worked if not you did a step incorrectly | + | (you need to be in root and it will ask you about the mySQL user name and password make sure you remember them) |
+ | |||
+ | apt-get install php5-mysql | ||
+ | |||
+ | apt-get install mysql-server | ||
+ | |||
+ | apt-get install apache2 | ||
+ | |||
+ | cd /var/www | ||
+ | |||
+ | mv index.html index-old.html | ||
+ | |||
+ | echo "<?php phpinfo(); ?>" > index.php | ||
+ | |||
+ | Then you go to localhost in your browser and if it comes up with a php page saying lots of info of your version it worked if not you did a step incorrectly |
Revision as of 12:40, 1 March 2012
MySQL notes
connecting to MySQL,
-u USERNAME -p
(change USERNAME to whatever you put as your user name when setting up mySQL)
then type your password.
exporting a file in mySQL,
mysqldump -u USERNAME -p DATABASENAME > FILENAME.sql
(change USERNAME,DATABASENAME and FILENAME to what there supposed to be!)
setting up localhost
(you need to be in root and it will ask you about the mySQL user name and password make sure you remember them)
apt-get install php5-mysql
apt-get install mysql-server
apt-get install apache2
cd /var/www
mv index.html index-old.html
echo "<?php phpinfo(); ?>" > index.php
Then you go to localhost in your browser and if it comes up with a php page saying lots of info of your version it worked if not you did a step incorrectly