centos 6.5 install mysql 5.6

3180 단어 Install
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/mysqldatadir = /var/lib/mysqlport = 3306# server_id = .....#socket = /var/lib/mysql/mysql.sockuser=mysql
 
 
 
 
http://sharadchhetri.com/2013/12/26/install-mysql-server-5-6-in-centos-6-x-and-red-hat-6-x-linux/

좋은 웹페이지 즐겨찾기