MYSQL – Installation

MYSQL is a simple SQL shell with input line editing capabilities. It supports interactive and noninteractive use. When used interactively, query results are presented in an ASCII-table format. When used noninteractively (for example, as a filter), the result is presented in tab-separated format. The output format can be changed using command options.

If you have problems due to insufficient memory for large result sets, use the –quick option. This forces mysql to retrieve results from the server a row at a time rather than retrieving the entire result set and buffering it in memory before displaying it.

Step for installation:
1. Check our packages of mysql

[root@my-home ~]# rpm -qa mysql\*
mysql-server-5.1.73-3.el6_5.x86_64
mysql-libs-5.1.73-3.el6_5.x86_64
mysql-5.1.73-3.el6_5.x86_64
[root@my-home ~]#

or we can download the packages

[root@my-home ~]# yum install -y mysql mysql-server

2. install mysql

[root@my-home ~]# mysql_secure_installation
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Change the root password? [Y/n]
.....
All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

Real world tips: Enter current password for root (enter for none):
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) –> check our mysqld service, if it stop please start it.

3. test our mysql

[root@my-home ~]# mysql -u root -p
Enter password:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| banjarnahor        |
| mysql              |
+--------------------+
5 rows in set (0.12 sec)

if we lost our password. we can see here.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>