Command-Line-Notes

From *** My Personal Wiki ***
Jump to navigation Jump to search

freemonsandlewould@freemonsandlewould-desktop:~$ sudo apt-get install mysql-server [sudo] password for freemonsandlewould: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required:

 linux-headers-2.6.24-19-generic linux-headers-2.6.24-19

Use 'apt-get autoremove' to remove them. The following extra packages will be installed:

 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl mysql-client-5.0 mysql-common mysql-server-5.0

Suggested packages:

 dbishell libcompress-zlib-perl mysql-doc-5.0 tinyca

Recommended packages:

 libhtml-template-perl mailx

The following NEW packages will be installed:

 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl mysql-client-5.0 mysql-common mysql-server
 mysql-server-5.0

0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 38.2MB of archives. After this operation, 112MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://us.archive.ubuntu.com hardy-updates/main mysql-common 5.0.51a-3ubuntu5.4 [60.3kB] Get:2 http://us.archive.ubuntu.com hardy/main libnet-daemon-perl 0.38-1.1 [45.9kB] Get:3 http://us.archive.ubuntu.com hardy/main libplrpc-perl 0.2017-1.1 [35.0kB] Get:4 http://us.archive.ubuntu.com hardy/main libdbi-perl 1.601-1 [771kB] Get:5 http://us.archive.ubuntu.com hardy-updates/main libmysqlclient15off 5.0.51a-3ubuntu5.4 [1837kB] Get:6 http://us.archive.ubuntu.com hardy/main libdbd-mysql-perl 4.005-1 [134kB] Get:7 http://us.archive.ubuntu.com hardy-updates/main mysql-client-5.0 5.0.51a-3ubuntu5.4 [7826kB] Get:8 http://us.archive.ubuntu.com hardy-updates/main mysql-server-5.0 5.0.51a-3ubuntu5.4 [27.4MB] Get:9 http://us.archive.ubuntu.com hardy-updates/main mysql-server 5.0.51a-3ubuntu5.4 [54.2kB] Fetched 38.2MB in 29s (1291kB/s) Preconfiguring packages ... Selecting previously deselected package mysql-common. (Reading database ... 113615 files and directories currently installed.) Unpacking mysql-common (from .../mysql-common_5.0.51a-3ubuntu5.4_all.deb) ... Selecting previously deselected package libnet-daemon-perl. Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.38-1.1_all.deb) ... Selecting previously deselected package libplrpc-perl. Unpacking libplrpc-perl (from .../libplrpc-perl_0.2017-1.1_all.deb) ... Selecting previously deselected package libdbi-perl. Unpacking libdbi-perl (from .../libdbi-perl_1.601-1_i386.deb) ... Selecting previously deselected package libmysqlclient15off. Unpacking libmysqlclient15off (from .../libmysqlclient15off_5.0.51a-3ubuntu5.4_i386.deb) ... Selecting previously deselected package libdbd-mysql-perl. Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.005-1_i386.deb) ... Selecting previously deselected package mysql-client-5.0. Unpacking mysql-client-5.0 (from .../mysql-client-5.0_5.0.51a-3ubuntu5.4_i386.deb) ... Setting up mysql-common (5.0.51a-3ubuntu5.4) ... Selecting previously deselected package mysql-server-5.0. (Reading database ... 113877 files and directories currently installed.) Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-3ubuntu5.4_i386.deb) ... Selecting previously deselected package mysql-server. Unpacking mysql-server (from .../mysql-server_5.0.51a-3ubuntu5.4_all.deb) ... Setting up libnet-daemon-perl (0.38-1.1) ... Setting up libplrpc-perl (0.2017-1.1) ... Setting up libdbi-perl (1.601-1) ... Setting up libmysqlclient15off (5.0.51a-3ubuntu5.4) ...

Setting up libdbd-mysql-perl (4.005-1) ... Setting up mysql-client-5.0 (5.0.51a-3ubuntu5.4) ... Setting up mysql-server-5.0 (5.0.51a-3ubuntu5.4) ...

* Stopping MySQL database server mysqld                                                                                        [ OK ] 

Reloading AppArmor profiles : done.

* Starting MySQL database server mysqld                                                                                        [ OK ] 
* Checking for corrupt, not cleanly closed and upgrade needing tables.

Setting up mysql-server (5.0.51a-3ubuntu5.4) ... Processing triggers for libc6 ... ldconfig deferred processing now taking place freemonsandlewould@freemonsandlewould-desktop:~$ freemonsandlewould@freemonsandlewould-desktop:~$ sudo apt-get install php5-mysql [sudo] password for freemonsandlewould: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required:

 linux-headers-2.6.24-19-generic linux-headers-2.6.24-19

Use 'apt-get autoremove' to remove them. The following extra packages will be installed:

 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libpq5 php5-common

Suggested packages:

 apache2-doc php-pear

The following NEW packages will be installed:

 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libpq5 php5-common php5-mysql

0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 4439kB of archives. After this operation, 12.1MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://us.archive.ubuntu.com hardy/main libapr1 1.2.11-1 [115kB] Get:2 http://us.archive.ubuntu.com hardy-updates/main libpq5 8.3.5-0ubuntu0.8.04 [282kB] Get:3 http://us.archive.ubuntu.com hardy/main libaprutil1 1.2.12+dfsg-3 [70.0kB] Get:4 http://us.archive.ubuntu.com hardy-updates/main apache2-utils 2.2.8-1ubuntu0.3 [139kB] Get:5 http://us.archive.ubuntu.com hardy-updates/main apache2.2-common 2.2.8-1ubuntu0.3 [754kB] Get:6 http://us.archive.ubuntu.com hardy-updates/main apache2-mpm-prefork 2.2.8-1ubuntu0.3 [230kB] Get:7 http://us.archive.ubuntu.com hardy-updates/main php5-common 5.2.4-2ubuntu5.4 [314kB] Get:8 http://us.archive.ubuntu.com hardy-updates/main libapache2-mod-php5 5.2.4-2ubuntu5.4 [2469kB] Get:9 http://us.archive.ubuntu.com hardy-updates/main php5-mysql 5.2.4-2ubuntu5.4 [65.2kB] Fetched 4439kB in 18s (234kB/s) Selecting previously deselected package libapr1. (Reading database ... 115832 files and directories currently installed.) Unpacking libapr1 (from .../libapr1_1.2.11-1_i386.deb) ... Selecting previously deselected package libpq5. Unpacking libpq5 (from .../libpq5_8.3.5-0ubuntu0.8.04_i386.deb) ... Selecting previously deselected package libaprutil1. Unpacking libaprutil1 (from .../libaprutil1_1.2.12+dfsg-3_i386.deb) ... Selecting previously deselected package apache2-utils. Unpacking apache2-utils (from .../apache2-utils_2.2.8-1ubuntu0.3_i386.deb) ... Selecting previously deselected package apache2.2-common. Unpacking apache2.2-common (from .../apache2.2-common_2.2.8-1ubuntu0.3_i386.deb) ... Selecting previously deselected package apache2-mpm-prefork. Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.8-1ubuntu0.3_i386.deb) ... Selecting previously deselected package php5-common. Unpacking php5-common (from .../php5-common_5.2.4-2ubuntu5.4_i386.deb) ... Selecting previously deselected package libapache2-mod-php5. Unpacking libapache2-mod-php5 (from .../libapache2-mod-php5_5.2.4-2ubuntu5.4_i386.deb) ... Selecting previously deselected package php5-mysql. Unpacking php5-mysql (from .../php5-mysql_5.2.4-2ubuntu5.4_i386.deb) ... Setting up libapr1 (1.2.11-1) ...

Setting up libpq5 (8.3.5-0ubuntu0.8.04) ...

Setting up libaprutil1 (1.2.12+dfsg-3) ...

Setting up apache2-utils (2.2.8-1ubuntu0.3) ... Setting up apache2.2-common (2.2.8-1ubuntu0.3) ... Module alias installed; run /etc/init.d/apache2 force-reload to enable. Module autoindex installed; run /etc/init.d/apache2 force-reload to enable. Module dir installed; run /etc/init.d/apache2 force-reload to enable. Module env installed; run /etc/init.d/apache2 force-reload to enable. Module mime installed; run /etc/init.d/apache2 force-reload to enable. Module negotiation installed; run /etc/init.d/apache2 force-reload to enable. Module setenvif installed; run /etc/init.d/apache2 force-reload to enable. Module status installed; run /etc/init.d/apache2 force-reload to enable. Module auth_basic installed; run /etc/init.d/apache2 force-reload to enable. Module authz_default installed; run /etc/init.d/apache2 force-reload to enable. Module authz_user installed; run /etc/init.d/apache2 force-reload to enable. Module authz_groupfile installed; run /etc/init.d/apache2 force-reload to enable. Module authn_file installed; run /etc/init.d/apache2 force-reload to enable. Module authz_host installed; run /etc/init.d/apache2 force-reload to enable.

Setting up apache2-mpm-prefork (2.2.8-1ubuntu0.3) ...

* Starting web server apache2                                                                                                                                                                                                               apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                                                                                                                                                     [ OK ]

Setting up php5-common (5.2.4-2ubuntu5.4) ... Setting up libapache2-mod-php5 (5.2.4-2ubuntu5.4) ...

Creating config file /etc/php5/apache2/php.ini with new version

* Reloading web server config apache2                                                                                                                                                                                                       apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                                                                                                                                                     [ OK ]

Setting up php5-mysql (5.2.4-2ubuntu5.4) ...

Processing triggers for libc6 ... ldconfig deferred processing now taking place freemonsandlewould@freemonsandlewould-desktop:~$ freemonsandlewould@freemonsandlewould-desktop:~$ sudo apt-get install apache2 [sudo] password for freemonsandlewould: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required:

 linux-headers-2.6.24-19-generic linux-headers-2.6.24-19

Use 'apt-get autoremove' to remove them. The following NEW packages will be installed:

 apache2

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 44.6kB of archives. After this operation, 102kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com hardy-updates/main apache2 2.2.8-1ubuntu0.3 [44.6kB] Fetched 44.6kB in 1s (28.7kB/s) Selecting previously deselected package apache2. (Reading database ... 116423 files and directories currently installed.) Unpacking apache2 (from .../apache2_2.2.8-1ubuntu0.3_all.deb) ... Setting up apache2 (2.2.8-1ubuntu0.3) ... freemonsandlewould@freemonsandlewould-desktop:~$ sudo apt-get install php5 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required:

 linux-headers-2.6.24-19-generic linux-headers-2.6.24-19

Use 'apt-get autoremove' to remove them. The following NEW packages will be installed:

 php5

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 1078B of archives. After this operation, 20.5kB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com hardy-updates/main php5 5.2.4-2ubuntu5.4 [1078B] Fetched 1078B in 0s (2445B/s) Selecting previously deselected package php5. (Reading database ... 116430 files and directories currently installed.) Unpacking php5 (from .../php5_5.2.4-2ubuntu5.4_all.deb) ... Setting up php5 (5.2.4-2ubuntu5.4) ... freemonsandlewould@freemonsandlewould-desktop:~$ sudo apt-get install libapache2-mod-php5 Reading package lists... Done Building dependency tree Reading state information... Done libapache2-mod-php5 is already the newest version. libapache2-mod-php5 set to manually installed. The following packages were automatically installed and are no longer required:

 linux-headers-2.6.24-19-generic linux-headers-2.6.24-19

Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. freemonsandlewould@freemonsandlewould-desktop:~$ sudo /etc/init.d/apache2 restart

* Restarting web server apache2                                                                                                                                                                                                             apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

                                                                                                                                                                                                                                     [ OK ]

freemonsandlewould@freemonsandlewould-desktop:~$ mysqladmin create <emarketbrasil_ads> bash: syntax error near unexpected token `newline' freemonsandlewould@freemonsandlewould-desktop:~$ mysqladmin create <emarketbrasil_ads> bash: syntax error near unexpected token `newline' freemonsandlewould@freemonsandlewould-desktop:~$ create<emarketbrasil_ads> bash: syntax error near unexpected token `newline' freemonsandlewould@freemonsandlewould-desktop:~$ create emarketbrasil_ads bash: create: command not found freemonsandlewould@freemonsandlewould-desktop:~$ apt-get install phpmyadmin E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? freemonsandlewould@freemonsandlewould-desktop:~$ stop/restart apache bash: stop/restart: No such file or directory freemonsandlewould@freemonsandlewould-desktop:~$ start apache start: Need to be root freemonsandlewould@freemonsandlewould-desktop:~$ stop apache stop: Need to be root freemonsandlewould@freemonsandlewould-desktop:~$ cd.. bash: cd..: command not found freemonsandlewould@freemonsandlewould-desktop:~$ su Password: su: Authentication failure freemonsandlewould@freemonsandlewould-desktop:~$ su Password: su: Authentication failure freemonsandlewould@freemonsandlewould-desktop:~$ su Password: su: Authentication failure freemonsandlewould@freemonsandlewould-desktop:~$ su Password: su: Authentication failure freemonsandlewould@freemonsandlewould-desktop:~$ su Password: su: Authentication failure freemonsandlewould@freemonsandlewould-desktop:~$ sudo passwd [sudo] password for freemonsandlewould: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully freemonsandlewould@freemonsandlewould-desktop:~$ su Password: root@freemonsandlewould-desktop:/home/freemonsandlewould# stop/restart apache bash: stop/restart: No such file or directory root@freemonsandlewould-desktop:/home/freemonsandlewould# stop apache stop: Unknown job: apache root@freemonsandlewould-desktop:/home/freemonsandlewould# restart apache bash: restart: command not found root@freemonsandlewould-desktop:/home/freemonsandlewould# dir Desktop Documents Examples Music Pictures Public Templates Videos root@freemonsandlewould-desktop:/home/freemonsandlewould# sudo apt-get install phpmyadmin Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required:

 linux-headers-2.6.24-19-generic linux-headers-2.6.24-19

Use 'apt-get autoremove' to remove them. The following extra packages will be installed:

 libmcrypt4 php5-mcrypt

Suggested packages:

 libmcrypt-dev mcrypt

Recommended packages:

 php5-gd php4-gd

The following NEW packages will be installed:

 libmcrypt4 php5-mcrypt phpmyadmin

0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 2958kB of archives. After this operation, 10.7MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://us.archive.ubuntu.com hardy/universe libmcrypt4 2.5.7-5 [79.2kB] Get:2 http://us.archive.ubuntu.com hardy/universe php5-mcrypt 5.2.3-0ubuntu1 [18.6kB] Get:3 http://us.archive.ubuntu.com hardy-updates/universe phpmyadmin 4:2.11.3-1ubuntu1.1 [2860kB] Fetched 2958kB in 6s (483kB/s) Preconfiguring packages ... Selecting previously deselected package libmcrypt4. (Reading database ... 116431 files and directories currently installed.) Unpacking libmcrypt4 (from .../libmcrypt4_2.5.7-5_i386.deb) ... Selecting previously deselected package php5-mcrypt. Unpacking php5-mcrypt (from .../php5-mcrypt_5.2.3-0ubuntu1_i386.deb) ... Selecting previously deselected package phpmyadmin. Unpacking phpmyadmin (from .../phpmyadmin_4%3a2.11.3-1ubuntu1.1_all.deb) ... Setting up libmcrypt4 (2.5.7-5) ...

Setting up php5-mcrypt (5.2.3-0ubuntu1) ...

Setting up phpmyadmin (4:2.11.3-1ubuntu1.1) ...

Processing triggers for libc6 ... ldconfig deferred processing now taking place root@freemonsandlewould-desktop:/home/freemonsandlewould# sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin root@freemonsandlewould-desktop:/home/freemonsandlewould# mysql -u roo -p < /path/to/file.sql bash: /path/to/file.sql: No such file or directory root@freemonsandlewould-desktop:/home/freemonsandlewould# mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) root@freemonsandlewould-desktop:/home/freemonsandlewould# mysql -uUSERNAME –pPASSWORD DATABASENAME < MYDATABASE.sql bash: MYDATABASE.sql: No such file or directory root@freemonsandlewould-desktop:/home/freemonsandlewould# dir Desktop Documents Examples Music Pictures Public Templates Videos root@freemonsandlewould-desktop:/home/freemonsandlewould# cd desktop bash: cd: desktop: No such file or directory root@freemonsandlewould-desktop:/home/freemonsandlewould# desktop bash: desktop: command not found root@freemonsandlewould-desktop:/home/freemonsandlewould# dir Desktop Documents Examples Music Pictures Public Templates Videos root@freemonsandlewould-desktop:/home/freemonsandlewould# cd desktop bash: cd: desktop: No such file or directory root@freemonsandlewould-desktop:/home/freemonsandlewould# cd Desktop root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# dir mysql.amarketplaceofideas.com.sql root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# dir mysql.amarketplaceofideas.com.sql root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# cd .. root@freemonsandlewould-desktop:/home/freemonsandlewould# cd Desktop root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# dir mysql.amarketplaceofideas.com.sql root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# dir mysql.amarketplaceofideas.com.sql root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# mysql -h localhost -u root -p wpweblog <mysql.amarketplaceofideas.com.sql Enter password: ERROR 1044 (42000) at line 21: Access denied for user 'root'@'localhost' to database 'information_schema' root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# mysql -h localhost -u root -p wpweblog <mysql.amarketplaceofideas.com.sql Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop# mysql -h localhost -u root -p wpweblog <mysql.amarketplaceofideas.com.sql Enter password: ERROR 1044 (42000) at line 21: Access denied for user 'root'@'localhost' to database 'information_schema' root@freemonsandlewould-desktop:/home/freemonsandlewould/Desktop#