Difference between revisions of "User:Saul/notes"

From Organic Design wiki
(MySQL info page made!!!)
 
m (Nad moved page User:Nutmmm/notes to User:Saul/notes: Automatically moved page while renaming the user "Nutmmm" to "Saul")
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
MySQL notes:<br />
+
== MySQL notes ==
connecting to MySQL,<br />
+
connecting to MySQL,
-u USERNAME -p <br />
+
 
(change USERNAME to whatever you put as your user name when setting up mySQL)<br />
+
:mysql -u USERNAME -p
then type your password. <br />
+
(change USERNAME to whatever you put as your user name when setting up mySQL)
<br />
+
 
exporting a file in mySQL,<br />
+
then type your password.
mysqldump -u USERNAME -p DATABASENAME > FILENAME.sql<br />
+
 
(change USERNAME,DATABASENAME and FILENAME to what there supposed to be!) <br />
+
 
<br />
+
exporting a file in mySQL,
setting up localhost:<br />
+
 
(you need to be in root and it will ask you about the mySQL user name and password make sure you remember them)<br />
+
:mysqldump -u USERNAME -p DATABASENAME > FILENAME.sql
apt-get install php5-mysql<br />
+
(change USERNAME,DATABASENAME and FILENAME to what there supposed to be!)
apt-get install mysql-server<br />
+
 
apt-get install apache2<br />
+
== setting up localhost ==
cd /var/www<br />
+
 
mv index.html index-old.html<br />
+
(you need to be in root and it will ask you about the mySQL user name and password make sure you remember them)
cd ..<br />
+
 
mv wwwinfo.php into www/index.php<br />
+
:apt-get install apache2 mysql-server php5-mysql
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 <br />
+
 
 +
 
 +
: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 that looks [{{SERVER}}/files/info.php like this] then it worked, if not you did a step incorrectly

Latest revision as of 21:53, 13 March 2018

MySQL notes

connecting to MySQL,

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 apache2 mysql-server php5-mysql


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 that looks like this then it worked, if not you did a step incorrectly