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 […]
Archive for June, 2008
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, […]