Not Setting up web development environment [lamp] in Ubuntu Linux [memoir/unedited]
Tags: beginners, reminder
Published: 2020-03-28 05:47:46

Can't believe it's actually been 4 months since I first wrote about diving into web development!
https://dev.to/bijaykumarpun/diving-into-web-development-after-android-hao
Just today I sort of 'finished' setting up development server in my Ubuntu 19.04.
I know it is late! [But I've been busy with some more important stuff]

So, few weeks back, trying to setup web development environment for linux ubuntu, i came to understand that this 'web development environment' included setting up some 'virtual' server or so in my local machine.
This is done via LAMP stack; L-Linux A-Apache M-MySQL P-PHP. Stack as in a group of technology?
So if these 4 things are setup correctly then it is ready for doing web development! Ofcurse you can just create simple php/html files and run that without servers, but where's the fun in that? Since I wanted to do more, php and mysql were the ones, and it needed its own servers. Turns out php is a server side code, and runs in servers! So, duh.

Now it took me quite a while, and quite 'a lot' of tries to properly set up LAMP stack in my system. 

First of all, I tried to setup all these using some 'Digital Ocean' link, one by one.
i.e. I installed apache server, then MySQL and then PHP. All went good.
Then i had to install phpmyadmin, something that enables to fiddle with mysql databases. I wonder why phpmyadmin is called so when in fact it is used for mysql. Why?

Anyway, while doing initial setup with phpmyadmin i had to select a server and then password as well. I selected server to apache (cause that's what i was using), and I set password to something simple like 'root123'.
But it wasn't accepted! 
Some error message related to "Your password doesn't satisfy the current policy .." showed up.
Turns out that there is some password/security/authentication related plugin that comes in default in latest versions of MySQL. What this does is set a standard for the strong-ness of the password. It even had levels in single digit (0, 1 etc).
To solve this problem, I had two options as far as I can remember:
1. Remove the plugin completely
2. Set the password level to the least possible.
I pretty much tried to do both but none worked!
The next day, I uninstalled everything again and tried to install again.
Same issue. Same outcome.

A few weeks later, I came back to it, but this time -instead of manually installing everything- i used lamp stack by/of/from Bitnami.
It asked for a simple username and password during setup, and that was it.
Everything worked magically.
I could access phpMyAdmin with username and password set during the setup , run server etc.

Then I had this sudden urge to see that happens if i delete the current user with root access in phpMyAdmin.
So that's what I did. I deleted the only user that had access to the phpMyAdmin.
And that is how  the following days turned into a hell week!

After trying for 5 to 6 times, over a period of a week, uninstalling components - reinstalling them, breaking some few more packages, I was able to gain access to phpMyAdmin again.

//notes
Command:
grep "something" abc.txt;
-Searches String "something" from abc.txt file and prints on screen

grep "something" -n abc.txt;
-Searches String "something" from abc.txt file and prints with line number
-Very-very handy when you need to edit a configuration file via command line
Eg. Change 'localhost' to '127.0.0.1' in $cfg[Servers][i]['host']='localhost'; from my.cnf file.
To do this, you can:
a] Open the file in commandline with vim and manually look for the entry [Takes a lot of time]
b] Open the file in some GUI text editor and change the entry [Where's the fun in that?]

Thus, grep comes in use! Especially grep with -n option

Ubuntu file system:
usr = Universal System Resource? Unix System Resource ? Debatable!

etc = was et-cetera, for files that just didnt fit anywhere specific
-pronounced et-c, also known as Editable Text Configuration , or even Everything To Configure! Basically has configuration files

var = directory for variables, files that changed frequently
-it is also where the www/html/index.html file is. the default 'hosting' location for files created with lamp stack

bin = binary files. files to store binary files. There are other location for storing binary files too.

boot = boot files. no touchy-touchy.

dev = devices, when you connect a device, files will pop here

home = home is where your heart is

mnt = devices mounted. kinda like dev

srv = it's for services ?

tmp = temporary files, things needed for programs to run but are in 'temp' state



--------------------------------
systemctl status apache2.service 
-show status of service
systemctl start *.service
-start a service
systemctl stop *service
-stop a service
systemctl restart *.service
-restart a service

"systemctl is some newer version that works with systemd"
-This is questionable statement

Services can also be started/stopped/restarted:
sudo service mysql restart
sudo service mysql stop
sudo service mysql start
-Starting mysql server that is



__________________________________
Create symbolic links
Eg. if phpmyadmin is not working in localhost (inside var/www/html/), but  index.html file is working then just create symbolic link of phpmyadmin

sudo ln -s /usr/share/phpmyadmin /var/www/html/

ln creates link
s option makes sure it is symbolic 
symbolic link is a 'shortcut' in a sense, but if changed will change the original file as well (sort of)

--------------

sudo mysqld_safe --skip-grant-tables
-Gives access to mysql without having to enter password


------------------------------
ps
-show all process
ps -aux
-show all process + some more

kill 22323
-kill process with process id 22323

ps -aux | grep 'mysqld'
-search process mysqld information

sudo killall mysqld mysqld_safe
-kill process


------------------------
sudo apt-get remove --purge mysql*
-Removes package and files that begins with mysql and on.
-Should not be done as all files will be deleted, that only has to begin with mysql
-This sort of thing removed my desktop settings, which i realized only a few days later

-------------------------------
finally:
history
-shows all history
history -d 212
-delete history entry 212, in case something stupid happens


--------------------------------------------------------------
Entire history
  930  chmod 777 Postman 
  931  clear
  932  sudo ./Postman 
  933  ./Postman 
  934  sudo apt-get autoremove
  935  mkdir s
  936  clear
  937  mv *resized* s
  938  exit
  939  sudo apt-get install nautilus-image-converter
  940  nautilus -q
  941  exit
  942  ./lamp.run 
  943  clear
  944  cd /etc/phpMyAdmin
  945  clear
  946  ls
  947  cd/
  948  clear
  949  cd /
  950  clear
  951  ls
  952  cd etc/
  953  ls
  954  cd phpmyadmin/
  955  clear
  956  ls
  957  vim config.inc.php
  958  sudo vim config.inc.php
  959  clear
  960  ls
  961  clear
  962  ls
  963  sudo vim config.inc.php
  964  clear
  965  ls
  966  cd ~homay/
  967  clear
  968  ls
  969  cd Installation/
  970  clear
  971  ls
  972  cd lampp
  973  ls
  974  cd config/
  975  ls
  976  cd ..
  977  cd apache2/
  978  ls
  979  cd ..
  980  ls
  981  cd mysql/
  982  ls
  983  cd bn
  984  cd var/
  985  ls
  986  cd lib
  987  ls
  988  *clear
  989  ls
  990  clear
  991  cd /
  992  ls
  993  cd etc/
  994  ls
  995  cd php
  996  cd ../phpmyadmin/
  997  ls
  998  clear
  999  sudo vim config.inc.php
 1000  clear
 1001  mysqladmin -u root password 'root123'
 1002  sudo apt install mysql-client-core-8.0
 1003  clear
 1004  mysql -u root mysql
 1005  mysql -u root mysql -p
 1006  clear
 1007  sudo mysql -u root -p
 1008  /usr/local/mysql/bin/mysql start
 1009  mysqladmin -u root -p status
 1010  service mysqld start
 1011  ls
 1012  cd ~/Installation/
 1013  ls
 1014  cd lampp/
 1015  ls
 1016  clear
 1017  ls
 1018  ./uninstall 
 1019  clear
 1020  exit
 1021  sudo apt-et purge phpmyadmin
 1022  sudo apt-get purge phpmyadmin
 1023  cd /
 1024  cd ~/Installation/
 1025  ls
 1026  clear
 1027  ls
 1028  cd lam
 1029  cd lampp
 1030  ls
 1031  cd ..
 1032  clear
 1033  rm -fr lampp/
 1034  clear
 1035  ls
 1036  cd ../Backup/
 1037  ls
 1038  ./lamp.run
 1039  clear
 1040  sudo apt-get remove --purge mysql*
 1041  clear
 1042  ls
 1043  ./lamp.run 
 1044  clear
 1045  php
 1046  php -v
 1047  mysql -v
 1048  sudo apt install mysql-client-core-8.0
 1049  clear
 1050  phpmyadmin
 1051  sudo service apach2 restart
 1052  cd ~/Installation/
 1053  ls
 1054  cd ..
 1055  cd Backup/
 1056  ls
 1057  ./lamp.run 
 1058  ls
 1059  cd ..
 1060  clear
 1061  ls
 1062  cd lampstack-7.3.15-2/
 1063  ls
 1064  cd ..
 1065  rm -rl lampstack-7.3.15-2/
 1066  rm -rf lampstack-7.3.15-2/
 1067  clear
 1068  mysql
 1069  sudo apt-get remove --purge mysql*
 1070  clear
 1071  php
 1072  php -v
 1073  sudo apt-get remove --purge php*
 1074  clear
 1075  php -v
 1076  mysql -v
 1077  cler
 1078  clear
 1079  ls
 1080  ./ Backup/lamp.run 
 1081  cd Backup/
 1082  ls
 1083  ./lamp.run
 1084  clear
 1085  mysql
 1086  mysql -v
 1087  clear
 1088  mysql -v
 1089  sudo apt update
 1090  clear
 1091  sudo apt install mysql-server
 1092  clear
 1093  sudo apt install php libapache-mod-php
 1094  sudo apt install php libapache2-mod-php
 1095  clear
 1096  php -v
 1097  mysql -v
 1098  sudo apt-get remove -y mysql-*
 1099  sudo apt-get purge -y mysql-*
 1100  sudo apt autoremove
 1101  clear
 1102  sudo apt install mysql-server
 1103  clear
 1104  sudo systemctl status mysql
 1105  sud systemctl service restart
 1106  sudo systemctl service restart
 1107  clear
 1108  git status
 1109  clear
 1110  git status
 1111  clear
 1112  git status
 1113  clear
 1114  git status
 1115  ls
 1116  git init
 1117  git remote add origin "https://github.com/bijaykumarpun/designpatterns.git"
 1118  git push -u origin master
 1119  clear
 1120  git status
 1121  git add .
 1122  git commit -m "First commit
 1123  "
 1124  git remote add origin "https://github.com/bijaykumarpun/designpatterns.git"
 1125  git remote
 1126  git push origin master
 1127  clear
 1128  git remote --show
 1129  git remote get-url origin/master
 1130  git remote get-url
 1131  git remote
 1132  git remote --get-url origin/master
 1133  git remote --get-url
 1134  git remote --get-url origin
 1135  git remote origin v
 1136  git remote origin -v
 1137  git remote show origin
 1138  clear
 1139  exit
 1140  sudo apt-get install exfat-fuse exfat-utils
 1141  efy
 1142  exit
 1143  sudo apt-get install --reinstall udisk2
 1144  sudo apt-get install --reinstall udisks2
 1145  clear
 1146  lsubs
 1147  sudo apt-get install lsubs
 1148  ls /dev/ | grep sd
 1149  ls /dev/| grep sd
 1150  sudo apt-get update && sudo apt-get install gparted
 1151  exit
 1152  sudo chmod 777 xampp-linux-x64-7.4.3-0-installer.run 
 1153  ./xampp-linux-x64-7.4.3-0-installer.run 
 1154  sudo ./xampp-linux-x64-7.4.3-0-installer.run 
 1155  ls ~
 1156  ls /
 1157  cd /
 1158  ls
 1159  cd var/www/
 1160  ls
 1161  cd html/
 1162  ls
 1163  vim index.html 
 1164  clear
 1165  git status
 1166  exit
 1167  sudo apt install apache
 1168  sudo apt install apache2
 1169  sudo apt install mysql-server
 1170  sudo apt install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php
 1171  sudo service apache2 restart
 1172  systemctl status apache2.service
 1173  php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
 1174  cd ~
 1175  ls
 1176  cd LaravelProjects/
 1177  ls
 1178  clear
 1179  ls
 1180  vim test.php
 1181  ls
 1182  test -v
 1183  php -v
 1184  clear
 1185  firefox test/
 1186  ls
 1187  firefox test.php
 1188  vim test
 1189  vim test.php 
 1190  exit
 1191  cd /etc/
 1192  clear
 1193  cd apache2/conf-enabled/
 1194  clear
 1195  sudo vim phpmyadmin.conf 
 1196  sudo ./lamp.run
 1197  clear
 1198  cd /var/www/
 1199  ls
 1200  cd html/
 1201  ls
 1202  vim index.html 
 1203  clear
 1204  ls
 1205  vim test.php
 1206  clear
 1207  firefox test.php
 1208  php -v
 1209  sudo apt-get install apache2 php7.x libapache2-mod-php7.x
 1210  sudo apt-get install apache2 php7.3 libapache2-mod-php7.3
 1211  a2query -m php7.3
 1212  sudo a2enmod php7.3
 1213  sudo service apache2 restart
 1214  a2dismod php7.2
 1215  a2enmod php7.3
 1216  sudo systemctl restart apache2
 1217  journalctl | tai
 1218  journalctl | tail
 1219  clear
 1220  cd
 1221  ls
 1222  cd /
 1223  ls
 1224  cd etc/
 1225  ls
 1226  cd apache2/
 1227  ls
 1228  cd ..
 1229  clear
 1230  ls
 1231  ls php/
 1232  clear
 1233  ls
 1234  clear
 1235  cd -
 1236  clear
 1237  ls
 1238  sudo vim apache2.conf 
 1239  clear
 1240  apache2ctl configtest
 1241  sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2
 1242  clear
 1243  sudo apt-get update
 1244  sudo systemctl status apache2.service
 1245  cd /etc/apache2/
 1246  ls
 1247  vim apache2.conf 
 1248  grep LockFile apache2.conf 
 1249  sudo vim apache2.conf 
 1250  sudo systemctl status apache2.service
 1251  clear
 1252  ls
 1253  vim apache2.conf 
 1254  sudo vim apache2.conf 
 1255  clear
 1256  sudo systemctl status apache2.service
 1257  clear
 1258  ls
 1259  cd ~/Installation/
 1260  ls
 1261  cd lammp/
 1262  ls
 1263  cd php
 1264  ls
 1265  cd php/
 1266  ls
 1267  cd /
 1268  ls
 1269  cd var/
 1270  ls
 1271  cd www/
 1272  ls
 1273  cd html/
 1274  ls
 1275  grep apache.conf
 1276  dpkg --list | grep apache.conf
 1277  dpkg --list | grep phpmyadmin
 1278  phpmyadmin
 1279  cd 
 1280  cd /
 1281  ls
 1282  clear
 1283  cd usr/
 1284  ls
 1285  cd share/
 1286  ls
 1287  cd php
 1288  cd ..
 1289  cd phpmclear
 1290  cd /
 1291  clear
 1292  find / -xdev 2?/dev/ -name "phpmyadmin"
 1293  find / -name phpmyadmin -type d
 1294  clear
 1295  sudo apt-get install -y phpmyadmin
 1296  clear
 1297  ls
 1298  cd etc/
 1299  ls
 1300  cd phpmyadmin/
 1301  ls
 1302  clear
 1303  sudo systemctl restart apache2
 1304  systemctl status apache2.service
 1305  clear
 1306  cd /etc/
 1307  ls
 1308  cd apache2/
 1309  ls
 1310  clear
 1311  sudo vim apache2.conf 
 1312  clear
 1313  ls
 1314  ls -la
 1315  rm -f .apache2.conf.swp 
 1316  sudo rm -f .apache2.conf.swp
 1317  clear
 1318  sudo systemctl reload apache2
 1319  sudo systemctl restart apache2
 1320  systemctl status apache2.service
 1321  sudo phpenmod mcrypt
 1322  sudo apt install php7.3-crypt
 1323  sudo apt install php7.1-crypt
 1324  sudo apt install php7.3-mcrypt
 1325  sudo vim /etc/apache2/apache2.conf 
 1326  /etc/init.d/apache2 restart
 1327  sudo aptinstall php-gettext
 1328  sudo apt install php-gettext
 1329  clear
 1330  systemctl status apache2.service
 1331  clear
 1332  sudo apache2ctl configtest
 1333  cd IN
 1334  cd Backup/
 1335  clear
 1336  ls
 1337  sudo./lamp.run
 1338  ./lamp.run 
 1339  sudo dpkg-reconfgure phpmyadmin
 1340  sudo dpkg-reconfigure phpmyadmin
 1341  sudo apache2ctl configtest
 1342  cd /etc/apache2/
 1343  ls
 1344  vim apache2.conf 
 1345  cd ..
 1346  cd phpmyadmin/
 1347  sudo vim apache.conf 
 1348  cd ..
 1349  cd apache2/
 1350  ls
 1351  cd conf-enabled/
 1352  ls
 1353  cd ..
 1354  cd conf-available/
 1355  ls
 1356  vim phpmyadmin.conf 
 1357  clear
 1358  service httpd start
 1359  sudo apt-get install mysql-server
 1360  sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
 1361  sudo /etc/init.d/apache2 reload
 1362  mysql
 1363  mysql -u root -p
 1364  mysal -u root -p
 1365  mysql -u root -p
 1366  mysql -u homay -p
 1367  mysqladmin -u root password NEWPASSWORD
 1368  mysqladmin -u root -p NEWPASSWORD
 1369  clear
 1370  cd /etc/phpmyadmin/
 1371  ls
 1372  sudo vim config.inc.php
 1373  sudo mysql --user=root mysql
 1374  sudo mysql --user=homay mysql
 1375  sudo mysql --user=phpmyadmin mysql
 1376  sudo service mysqld stop
 1377  sudo /etc/init.d/mysqld stop
 1378  service mysql stop
 1379  mysqld_safe --skip-grant-tables
 1380  sudo mysqld_safe --skip-grant-tables
 1381  mysql -u root
 1382  clear
 1383  cd /etc/phpmyadmin/
 1384  sudo vim config.inc.php
 1385  clear
 1386  sudo vim config.inc.php
 1387  /etc/init.d/apache2 restart
 1388  clear
 1389  sudo rm -rf lammp
 1390  cd /etc/
 1391  ls
 1392  ls *.cnf
 1393  ls -la
 1394  vim my.cnf
 1395  clear
 1396  ls
 1397  cd mysql/
 1398  ls
 1399  sudo my.cnf
 1400  sudo vim my.cnf
 1401  clear
 1402  /etc/init.d/apache2 restart
 1403  clear
 1404  sudo dpkg-reconfigure phpmyadmin
 1405  clear
 1406  sudo apt-get remove --purge *mysql\*
 1407  clear
 1408  sudo apt-get purge phpmyadmin
 1409  sudo apt autoremove
 1410  clear
 1411  sudo apt-get purge apache2
 1412  clears
 1413  udo apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin
 1414  sudo apt-get purge apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql phpmyadmin
 1415  clear
 1416  php -v
 1417  sudo apt-get --purge php
 1418  sudo apt-get install ppa
 1419  sudo apt-get install ppa-purge
 1420  sudo ppa-purge ppa:ondrej/php-7.3
 1421  sudo apt-get purge php7.3.2-common
 1422  sudo apt-get purge php7-common
 1423  sudo apt-get purge php7.3.11-common
 1424  clear
 1425  sudo apt-get purge php7.*
 1426  sudo dpkg-reconfigure phpmyadmin
 1427  clear
 1428  sudo apt-get purge phpmyadmin
 1429  sudo apt-get autoremove
 1430  sudo apt-get clean
 1431  clear
 1432  sudo apt-get install phpmyadmin
 1433  clear
 1434  cd /etc/phpmyadmin/
 1435  ls
 1436  sudo vim config-db.php 
 1437  /etc/init.d/apache2 restart
 1438  cd /etc/php
 1439  cd ../phpmyadmin/
 1440  clear
 1441  ls
 1442  ls -la
 1443  sudo mysql_secure_installation
 1444  sudo mysql -u root -p
 1445  clear
 1446  sudo mkdir /var/run/mysqld
 1447  sudo chown mysql /var/run/mysql
 1448  sudo chown mysql /var/run/mysqld
 1449  sudo mysqld_safe --skip-grant-tables&
 1450  adsl
 1451  sudo mysql --user=root mysql
 1452  sudo mysqld_safe --skip-grant-tables
 1453  mysql_upgrade -u root -p
 1454  sudo mysql_secure_installation
 1455  sudo dpkg-reconfigure phpmyadmin
 1456  clear
 1457  php -v
 1458  mysqld
 1459  mysql
 1460  mysql -v
 1461  apache2 --info
 1462  apache2 -v
 1463  clear
 1464  sudo apt-get --purge remove apache2
 1465  sudo apt autoremove
 1466  clear
 1467  cd /etc/
 1468  ls
 1469  cd mysql/
 1470  ls
 1471  cd ..
 1472  rm -rf mysql/
 1473  sudo rm -rf mysql/
 1474  clear
 1475  cd apache2/
 1476  ls
 1477  cd ..
 1478  rm -rf apache2/
 1479  sudo -fr apache2/
 1480  sudo rm -rf apache2/
 1481  clear
 1482  ls
 1483  cd ..
 1484  ls
 1485  clear
 1486  ls
 1487  cd etc/va
 1488  ls
 1489  cd .
 1490  cd var/
 1491  ls
 1492  cd www/
 1493  ls
 1494  cd html/
 1495  ls
 1496  ls -la
 1497  rm -rf phpmyadmin 
 1498  rm * -rf
 1499  clear
 1500  ls
 1501  cd /usr/share/
 1502  ls
 1503  clear
 1504  ls
 1505  cd .
 1506  cd ..
 1507  clear
 1508  ls
 1509  cd ..
 1510  clear
 1511  ls
 1512  exit
 1513  sudo /etc/
 1514  clear
 1515  cd /etc/
 1516  ls
 1517  cd init.d/
 1518  clear
 1519  ls
 1520  exit
 1521  SUDO ./lamp.run 
 1522  sudo ./lamp.run 
 1523  clear
 1524  php -v
 1525  mysql -v
 1526  cd /var/www/html/
 1527  clear
 1528  ls
 1529  sudo vim index.html
 1530  clear
 1531  ls
 1532  cat index.html 
 1533  service mysql stop
 1534  clear
 1535  ls
 1536  firefox index.html 
 1537  clear
 1538  php
 1539  clear
 1540  sudo apt-get update
 1541  clear
 1542  sudo apt-get install mysql-server mysql-client libmysqlclient-dev
 1543  clear
 1544  php -v
 1545  sudo apt-get install libapache2-mod-php7.0 php7.0 php7.0-common php7.0-curl php7.0-dev php7.0-gd php-pear php-imagick php7.0-mcrypt php7.0-mysql php7.0-ps php7.0-xsl
 1546  clear
 1547  ls
 1548  clear
 1549  sudo apt install apache2
 1550  clear
 1551  sudo ufw app list
 1552  sudo ufw app info "Apache Full"
 1553  clear
 1554  sudo ufw allow in "Apache Full"
 1555  clear
 1556  ifconfig
 1557  ipconfig
 1558  ifconfig
 1559  sudo apt install net-tools
 1560  clear
 1561  ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
 1562  clear
 1563  sudo apt install mysql-server
 1564  clear
 1565  sudo mysl_secure_installation
 1566  sudo mysql_secure_installation
 1567  sudo mysql
 1568  clear
 1569  sudo apt install php libapache2-mod-php php-mysql
 1570  clear
 1571  ls
 1572  sudo service apache2 stop
 1573  sudo apt install php libapache2-mod-php php-mysql
 1574  clear
 1575  sudo service apache2 restart
 1576  sudo service apache2 start
 1577  systemctl status apache2.service
 1578  clear
 1579  sudo /etc/apache2/
 1580  ls
 1581  cd /etc/apache2/
 1582  clear
 1583  ls
 1584  sudo vim apache2.conf 
 1585  clear
 1586  sudo service apache2 restart
 1587  sudo service apache2 start
 1588  systemctl status apache2.service 
 1589  netstat
 1590  netstat -ltnp | grep :80
 1591  netstat -ltnp
 1592  clear
 1593  grep -ri listen /etc/apache2/
 1594  clear
 1595  exit
 1596  clear
 1597  netstat -antp | grep 80
 1598  sudo service apache2 stp
 1599  sudo service apache2 stop
 1600  clear\
 1601  sudo service apache2 start
 1602  systemctl status apache2.service
 1603  clear
 1604  ls
 1605  clear
 1606  sudo apt install tree
 1607  clear
 1608  tree /
 1609  clear
 1610  tree -L 1
 1611  cd /
 1612  clear
 1613  ls
 1614  clear
 1615  tree -l 1
 1616  tree -L 1
 1617  clear
 1618  cd home/
 1619  ls
 1620  ls -la
 1621  clear
 1622  ls
 1623  cd ..
 1624  ls
 1625  clear
 1626  cd srv/
 1627  ls
 1628  clear
 1629  cd va
 1630  ls
 1631  cd var
 1632  cd ..
 1633  clear
 1634  ls
 1635  cd va
 1636  ls
 1637  cd var
 1638  ls
 1639  cd /var/www/html/
 1640  celar
 1641  ls
 1642  clear
 1643  ls
 1644  vim index.html 
 1645  sud vim index.html 
 1646  sudo vim index.html 
 1647  clear
 1648  rm -rf index.html 
 1649  clear
 1650  ls
 1651  sudo vim test.php
 1652  celar
 1653  clear
 1654  ls
 1655  clear
 1656  ls
 1657  exit
 1658  clear
 1659  cd /etc/phpmyadmin/
 1660  clear
 1661  ls
 1662  sudo vim config.inc.php 
 1663  clear
 1664  sudo service apache2 restart
 1665  sudo vim config.inc.php 
 1666  clear
 1667  sudo service apache2 start
 1668  sudo service apache2 stp
 1669  sudo service apache2 stop
 1670  sudo vim /etc/phpmyadmin/
 1671  clear
 1672  ls
 1673  sudo vim config.inc.php 
 1674  clear
 1675  sudo service apache2 start
 1676  clear
 1677  sudo apt-get install mysql-server mysql-common mysql-client
 1678  sudo vim config.inc.php 
 1679  clear
 1680  ls config*
 1681  exit
 1682  sudo apt-get install ubuntu-desktop
 1683  exit
 1684  clear
 1685  ls
 1686  cd /var/
 1687  ls
 1688  cd ww
 1689  ls
 1690  cd www
 1691  ls
 1692  cd html/
 1693  ls
 1694  cd ..
 1695  clear
 1696  cd /
 1697  ls
 1698  cd etc/
 1699  ls
 1700  clear
 1701  ls
 1702  cd ..
 1703  clear
 1704  systemctl status apache2.service
 1705  sudo service apache2 restart
 1706  sudo service apache2 stop
 1707  sudo service apache2 start
 1708  clear
 1709  ls
 1710  cd etc
 1711  ls
 1712  clear
 1713  ifconfig -a
 1714  clear
 1715  cd /usr/share
 1716  ls
 1717  sudo ln -s /usr/share/phpmyadmin /var/www/app-root/
 1718  clear
 1719  cd phpmyadmin
 1720  ls *admin
 1721  clear
 1722  sudo apt update
 1723  clear
 1724  sudo apt install phpmyadmin php-mbstring php-gettext
 1725  clear
 1726  sudo service apache2 restart
 1727  clear
 1728  history
 1729  sudo ln 0s /usr/share/phpmyadmin /var/www/html/
 1730  cd /usr/share
 1731  cd /var/www/html/
 1732  ls
 1733  sudo ln -s /usr/share/phpmyadmin /var/www/html
 1734  clear
 1735  mysql
 1736  mysql -u root - 
 1737  mysql -u root -p
 1738  mysql -u root 
 1739  clear
 1740  sudo service apache2 stop
 1741  clear
 1742  sudo service apache2 stop
 1743  cd /etc/
 1744  ls
 1745  cd phpmyadmin/
 1746  cd sh
 1747  ls
 1748  sudo vim config.inc.php
 1749  clear
 1750  sud service apache2 start
 1751  sudo service apache2 start
 1752  exit
 1753  mysql -u root
 1754  service mysql restart
 1755  service mysql status
 1756  service apache2 status
 1757  service phpmyadmin status
 1758  sudo service apache2 start
 1759  sudo vim /etc/phpmyadmin/config.inc.php
 1760  sudo service apache2 stop
 1761  sudo service mysql stop
 1762  sudo service mysql skip-grant-table start
 1763  sudo service mysql --skip-grant-table start
 1764  clear
 1765  cd /etc/mysql/
 1766  ls
 1767  sudo vim my.cnf
 1768  clear
 1769  sudo mysqld_safe --skip-grant-tables
 1770  sudo service mysql status
 1771  tail /var/log/mysql/error.log
 1772  sudo apt-get install mysqld
 1773  mysqld_safe --skip-grant-tables
 1774  sudo mysqld_safe --skip-grant-tables
 1775  clear
 1776  mkdir -p /var/run/mysqld
 1777  sudo mkdir -p /var/run/mysqld
 1778  chown mysql:mysql /var/run/mysqld
 1779  sudo chown mysql:mysql /var/run/mysqld
 1780  sudo mysqld_safe --skip-grant-tables
 1781  sudo mysqld_safe --skip-grant-tables &
 1782  clear
 1783  ls
 1784  cd /etc/phpmyadmin/
 1785  ls
 1786  grep 'host' config.inc.php
 1787  cat 'localhost' config.inc.php
 1788  find 'host' config.inc.php
 1789  grep -Hn 'host' config.inc.php
 1790  grep -Hn
 1791  grep --help
 1792  grep 'host' -h config.inc.php
 1793  grep -h 'host' cnfig.inc.php
 1794  grep 'host' -h config.inc.php
 1795  grep 'host' -H config.inc.php
 1796  grep 'host' -Hh config.inc.php
 1797  grep -Hh 'host' config.inc.php
 1798  grep -n 'host' config.inc.php
 1799  sudo vim config.inc.php
 1800  ls -la
 1801  sudo rm -f .config.inc.php.swp 
 1802  sudo vim config.inc.php
 1803  clear
 1804  sudo service mysql restart
 1805  clear
 1806  sudo service mysql stop
 1807  clear
 1808  sudo service mysql status
 1809  sudo service apache2 status
 1810  sudo service mysql start
 1811  c;ear
 1812  lear
 1813  clear
 1814  sudo service apache2 restart
 1815  sudo service apache2 status
 1816  clear
 1817  sudo service mysql stop
 1818  sudo /etc/innit.d/mysql stop
 1819  sudo /etc/init.d/mysql stp
 1820  sudo /etc/init.d/mysql stop
 1821  clear
 1822  sudo mysqld_safe --skip-grant-tables &
 1823  clear
 1824  mkdir --help
 1825  sudo mkdir -p /var/run/mysqld
 1826  sudo mysql:mysql /var/run/mysqld
 1827  sudo chown mysql:mysql /var/run/mysqld
 1828  clear
 1829  sudo mysqld_safe --skip-grant-tables &
 1830  mysql
 1831  process
 1832  ps
 1833  ps -aux
 1834  ps -aux | grep 'mysqld'
 1835  kill --help
 1836  kill 22225
 1837  kill 16748
 1838  sudo kill 16748
 1839  sudo kill 16603
 1840  sudo kill 16602
 1841  clear
 1842  sudo process -aux
 1843  ps -aux
 1844  ps -aux | grep 'mysqld'
 1845  sudo kill 16602
 1846  ps -aux | grep 'mysqld'
 1847  clear
 1848  sudo mysqld_safe --skip-grant-tables &
 1849  mysql -uroot
 1850  sudo mysqld_safe --skip-grant-tables &
 1851  mysql -uroot
 1852  sudo mysqld_safe --skip-grant-tables &
 1853  mysql -uroot
 1854  sudo mysqld_safe --skip-grant-tables
 1855  mysql
 1856  mysql -u root 
 1857  sudo ps kill 22771
 1858  sudo kill 22771
 1859  clear
 1860  git remote --get-url origin
 1861  clear
 1862  sudo mysqld_safe --skip-grant-tables &
 1863  mysql -uroot
 1864  sudo service mysql status
 1865  systemctl --help
 1866  desc mysql.user;
 1867  sudo /usr/local/mysql/bin/mysql -u root
 1868  mysql
 1869  sudo /etc/init.d/mysqld stp
 1870  sudo /etc/init.d/mysql stop
 1871  clear
 1872  sudo /etc/init.d/mysql stop
 1873  sudo service mysql stop
 1874  sudo mysqld_safe --skip-grant-tables &
 1875  ps -aux | mysqld
 1876  ps
 1877  ps --aux
 1878  ps -aux
 1879  clear
 1880  ps -aux | grep 'mysqld'
 1881  sudo kill 22759 22771 
 1882  ps -aux | grep 'mysqld'
 1883  kill 16602
 1884  sudo kill 16602
 1885  ps -aux | grep 'mysqld'
 1886  clear
 1887  sudo mysqld_safe --skip-grant-tables &
 1888  kill mysqld mysqld_safe
 1889  killall mysqld mysqld_safe
 1890  sudo killall mysqld mysqld_safe
 1891  sudo mysqld_safe --skip-grant-tables &
 1892  clear
 1893  sudo service mysql status
 1894  sudo service mysql start
 1895  systemctl status mysql.service
 1896  sudo service mysql start
 1897  systemctl status mysql.service
 1898  journalctl -xe
 1899  sudo service apache2 stop
 1900  systemctl stop apache2.service
 1901  systemctl start apache2.service
 1902  systemctl status apache2.service
 1903  systemctl start mysql.service
 1904  systemctl status mysql and journalctl -xe
 1905  systemctl status mysql 
 1906  sudo /usr/sbin/mysqld
 1907  firefox
 1908  mysqladmin -u root password newpass
 1909  mysqladmin flush-privileges password *
 1910  mysqladmin flush-privileges password Bij@y123
 1911  ;
 1912  cd /etc/mysql/
 1913  ls
 1914  sudo vim my.cnf
 1915  clear
 1916  mysql
 1917  mysql -u debian-sys-maint -p
 1918  celar
 1919  history
 1920  history -d 1919
 1921  history
 1922  cd /home/
 1923  ls
 1924  cd homay/
 1925  ls
 1926  cd Desktop/
 1927  clear
 1928  ls
 1929  history | cat > history.txt