Development Wall

help for php, codeigniter, javascript, jquery, mysql, apache, ubuntu

Archives for the ‘MYSql’ Category

Install Apache, PHP, MYSQL and phpMyAdmin in Ubuntu

By • Apr 1st, 2012 • Category: Apache, MYSql, PHP, Ubuntu

I will show the command and configuration to install Apache, PHP, MYSQL and phpMyAdmin in Ubuntu 1. Installing  Apache Open your terminal and type the bellow command        #sudo apt-get install apache2 It will ask for your password, Type your ubuntu password and press  enter key, it will ask for confirmation Type y and press [...]



Simple way to get random record from a MYSQL database table

By • Mar 11th, 2012 • Category: MYSql

If you want to get random row/ record from a MYSQL  database table you can use rand() function in your SQL query. The bellow example select 10 random id from the users table : SELECT id FROM users order by rand() limit 10 Note: rand() function might be slow for very large database table



export and import MYSQL database from command line

By • Mar 10th, 2012 • Category: MYSql

Sometimes you may need to export and import mysql database from command line. This might be useful when you are working with large database. Export database from MYSQL: Syntax: #mysqldump -u database_user_name -p  database-name >  destination-dir/desire-name.sql 1.  After -u put your database user name 2.  -p is for database password option 3.  After running this command [...]



start, stop, restart and show status of MYSQL from command line in ubuntu

By • Mar 8th, 2012 • Category: MYSql, Ubuntu

In bellow article I will show how to start, stop and restart MYSQL from the command line. I will also show how to see status of MYSQL from the command line. Open the terminal in Ubuntu and run the bellow command : Stop MySQL: # sudo /etc/init.d/mysql  stop This command will stop mysql Start MySQL: [...]



mysql command line login

By • Jan 3rd, 2012 • Category: MYSql

The bellow article will show how to login into mysql from command line and some basic command to work in with mysql in command line 1. Open the terminal in linux or in windows the command prompt 2. type the command:  mysql -u user-name -p here -u you should provide your user name and -p [...]