Difference between revisions of "Command line cheat sheet"

From TempusServa wiki
Jump to navigation Jump to search
old>Admin
old>Admin
Line 16: Line 16:
</blockquote>
</blockquote>


== LINUX Start and stop ==
Start/stop
 
Start services
<blockquote>sudo service mysqld start</blockquote>
<blockquote>sudo service mysqld start</blockquote>
<blockquote>sudo /etc/init.d/tomcat6 start</blockquote>
Stop services
<blockquote>sudo /etc/init.d/tomcat6 stop</blockquote>
<blockquote>sudo service mysqld stop</blockquote>
<blockquote>sudo service mysqld stop</blockquote>


Line 29: Line 23:


Start/stop server
Start/stop server
<blockquote>sudo /etc/init.d/tomcat6 stop</blockquote>
<blockquote>sudo /etc/init.d/tomcat6 start</blockquote>


Edit connection string
Edit connection string

Revision as of 00:39, 22 February 2013

MySQL commands

Import data from a SQL dump file to a specific database:

mysql -uroot -pPW1234 --default_character_set utf8 tslive < dumpLive.sql

Export data to SQL dump file from selected databases

mysql -uroot -pPW1234 --databases tslive tstest tsbase > dump.sql

Export ALL data to SQL dump file

mysql -uroot -pPW1234 --all-databases > dump.sql

Start/stop

sudo service mysqld start

sudo service mysqld stop

LINUX Tomcat

Start/stop server

sudo /etc/init.d/tomcat6 stop

sudo /etc/init.d/tomcat6 start

Edit connection string

sudo nano /usr/share/tomcat/conf/Catalina/localhost/TempusServa.xml

Edit server settings

sudo nano /usr/share/tomcat/conf/server.xml