centos 6.5 install mysql 5.6

To install the MySQL server 5.6,follow the given below steps.

Step 1:
 Login into the Server and download the yum repo rpm package.
(URL: http://dev.mysql.com/downloads/repo/)

yum install wget
wget http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm

Step 2: Now install the downloaded rpm package.

rpm -ivh mysql-community-release-el6-5.noarch.rpm

Step 3: Now install the mysql server by using yum command.
Note: The yum command by-default also install the dependencies

yum install mysql-server

Step 4: After installation start the mysql server

/etc/init.d/mysqld start

Other options:

Usage: /etc/init.d/mysqld {start|stop|status|restart|condrestart|try-restart|reload|force-reload}

Step 5: Because the MySQL server is just installed it has blank mysql root password. To reset the mysql root password.

You can use the given below command, and follow the instruction

mysql_secure_installation

You can also use the given below alternate method

Login into mysql server. Because it is freshly installed hence root password is blank

mysql -u root

After login you will get mysql propmt. Run the given commands (remove mysql> if you are doing copy paste these commands)

mysql> use mysql;
mysql> update user set password=PASSWORD("GIVE-NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
 

 

 From souce code

   # Preconfiguration setup
  shell> groupadd mysql
  shell> useradd -r -g mysql mysql
  # Beginning of source-build specific instructions
  shell> tar zxvf mysql-VERSION.tar.gz
  shell> cd mysql-VERSION
  shell> cmake .
  shell> make
  shell> make install
  # End of source-build specific instructions
  # Postinstallation setup
  shell> cd /usr/local/mysql
  shell> chown -R mysql .
  shell> chgrp -R mysql .
  shell> scripts/mysql_install_db --user=mysql
  shell> chown -R root .
  shell> chown -R mysql data
  shell> bin/mysqld_safe --user=mysql &
  # Next command is optional
  shell> cp support-files/mysql.server /etc/init.d/mysql

 

   ./bin/mysqladmin -u root password

vi /etc/my.cnf

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir = /usr/local/mysql
datadir = /var/lib/mysql
port = 3306
# server_id = .....
#socket = /var/lib/mysql/mysql.sock
user=mysql

 

 

 

 

http://sharadchhetri.com/2013/12/26/install-mysql-server-5-6-in-centos-6-x-and-red-hat-6-x-linux/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值