MySQL is a relational database management system (RDBMS) based on SQL (Structured Query Language). First released in January, 1998, MySQL is now one component of parent company MySQL AB’s product line of database servers and development tools. Yes, it really is this easy.run the following command to change the mysql root password
sudo /etc/init.d/mysql reset-password
New MySQL […]
Archive for 2008
Sometimes you want to restart your Apache server after changing some configuration in your virutual hosts,sites etc, but you have few hundred clients currently downloading files from your server and you don’t want to disconnect them.You need to use the following command
sudo /etc/init.d/apache2 graceful
This will gracefully restart your Apache with new configuration without affecting your […]
1. Telnet using TCP port 25 :
#telnet xxx.xxx.xxx.xxx 25
or
#telnet domain.tld 25
2. Issue the following smtp command sequence
helo <your domain name><enter>
response should be as follows
250 OK
mail from: <your Email Address><enter>
response should be as follows
250 OK - mail from <your Email address>
rcpt to: <recipient address><enter>
response should be as follows
250 OK - Recipient <recipient address>
data<enter>
response should be as […]
fsck is a Unix utility for checking and repairing file system inconsistencies . File system can become inconsistent due to several reasons and the most common is abnormal shutdown due to hardware failure , power failure or switching off the system without proper shutdown . Due to these reasons the superblock in a file system […]
Default package can’t support mysql 5.1.
There are some solutions to solve this problem. For example, You can install the non-RPM packages which can be downloaded from official web(www.mysql.org). But, my choice is to add some other package sources into source.list.
Edit file :
#vi /etc/apt/sources.list
add new line :
deb http://ppa.launchpad.net/monty/ubuntu gutsy main universe restricted multiverse
deb http://ppa.launchpad.net/smurf/ubuntu gutsy main […]
Displaying the MySQL version number
select version();
+———–+
| version() |
+———–+
| 3.22.32 |
+———–+
1 row in set (0.00 sec)
Displaying the current date and time
select now();
+———————+
| now() |
+———————+
| 2001-05-31 00:36:24 |
+———————+
1 row in set (0.00 sec)
Displaying the current Day, Month and Year
SELECT DAYOFMONTH(CURRENT_DATE);
+————————–+
| DAYOFMONTH(CURRENT_DATE) |
+————————–+
| 28 |
+————————–+
1 row in set (0.01 sec)
SELECT MONTH(CURRENT_DATE);
+———————+
| MONTH(CURRENT_DATE) |
+———————+
| 1 |
+———————+
1 row in set […]
Dowload Source File :
#cd /tmp
#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.25-rc.tar.gz/from/http://mysql.llarian.net/
Extract Source File :
#tar zxvf /tmp/mysql-5.1.25-rc.tar.gz
#cd /tmp/mysql-5.1.25-rc
Install Pacakge & Development Libralie :
#apt-get install build-essential libncurses5 libncurses5-dev
Add User & Group :
#groupadd mysql
#useradd -g mysql mysql
Configuration :
#./configure \
–prefix=/usr/local/mysql \
–with-mysqld-user=mysql \
–without-debug \
–with-client-ldflags=-all-static \
–with-mysqld-ldflags=-all-static \
–disable-shared \
–localstatedir=/usr/local/mysql/data \
–with-extra-charsets=none \
–enable-assembler \
–with-unix-socket-path=/tmp/mysql.socket
#make
#make install
Copy my.cnf
#cd /tmp/mysql-5.1.25-rc
#cp support-files/my-medium.cnf /etc/my.cnf
Create GRANT tables :
#/usr/local/mysql/bin/mysql_install_db –user=mysql
Changing Owners :
#chown -R root /usr/local/mysql
#chown -R […]
One of the main requirements for a fast web server is to has efficient and effective SQL statements or queries that are optimized. Any non-optimal SQL (Structured Query Language) commands or statements that take too long or lengthy time to execute will use up a lot of system resources, causing MySQL database to run slower, […]
Recently we’ve been converting an ISP’s servers from Debian Linux to Ubuntu Server. Ubuntu is heavily based on Debian so most things are the same. The most limiting factor so far has been that Ubuntu’s Main software package repository contains far fewer packages than Debian.
One Apache module we like to use on production servers is […]
#apt-get install curl libcurl3 libcurl3-dev php5-curl
ref : http://codehunter.net/category/ubuntu/