Tag Archives: MySQL

Creating a MySQL Dump File from Remote Datase

Sometimes you need mysql dump from your remote mysql database. Here is the command for generate mysql dump.

Command:
mysqldump -u username -p -h hostname dbname > filetosave.sql

Advertisements

MySQL command cheat sheet

Here I show how to use mysql from command line.

To login into mysql run –

mysql -h hostname -u root -p

To create ┬ádatabase on the sql server run –

mysql> create database [databasename];

List all databases on the sql server run –

mysql> show databases;

Switch to any database, run –

mysql> use [db name];

To see all the tables in the db run –

mysql> show tables;

Continue reading MySQL command cheat sheet

Install PHP5, MySQL, Apache on Ubuntu 12.04

I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux.

Install Apache:

To install Apache run this command –

sudo apt-get install apache2

Testing Apache

To make sure apache installed correctly enter this URL or your web browser.

http://localhost/

Then you will see a message saying “It works!” . That means Apache is running in your machine.

Install PHP

For install PHP5 run this command –

sudo apt-get install php5 libapache2-mod-php5

Then restart apache with this command

sudo /etc/init.d/apache2 restart

or

sudo service apache2 restart

Continue reading Install PHP5, MySQL, Apache on Ubuntu 12.04