All previous projects were deployed in the Windows system environment. This time we tried to deploy them in the Linux system environment. So this time we installed JDK, Maven, and Jboss on 7 hosts, installed Mysql on one of them, and configured the LAN. Finally, we completed the task. The installation steps will be shared with you below! System version: centos6.3-i386 32-bit operating system This installation is in the desktop environment. Use shell commands to install. The downloaded installation package is: [root@localhost ~]# rpm -qa | grep -i mysql mysql-libs-5.1.66-2.el6_3.x86_64 [root@localhost ~]# yum -y remove mysql-libs* b. Select the RPM package corresponding to Linux, as follows: [root@localhost rpm]# ll total 74364 -rw-r--r--. 1 root root 18442536 Dec 11 20:19 MySQL-client-5.6.15-1.el6.x86_64.rpm -rw-r--r--. 1 root root 3340660 Dec 11 20:06 MySQL-devel-5.6.15-1.el6.x86_64.rpm -rw-r--r--. 1 root root 54360600 Dec 11 20:03 MySQL-server-5.6.15-1.el6.x86_64.rpm c. Install MySQL [root@localhost rpm]# rpm -ivh MySQL-server-5.6.15-1.el6.x86_64.rpm [root@localhost rpm]# rpm -ivh MySQL-devel-5.6.15-1.el6.x86_64.rpm [root@localhost rpm]# rpm -ivh MySQL-client-5.6.15-1.el6.x86_64.rpm #Modify the configuration file location [root@localhost rpm]# cp /usr/share/mysql/my-default.cnf /etc/my.cnf d. Initialize MySQL and set password [root@localhost rpm]# /usr/bin/mysql_install_db [root@localhost rpm]# service mysql start [root@localhost rpm]# cat /root/.mysql_secret # View the root account password# The random password set for the root user at Wed Dec 11 23:32:50 2013 (local time): qKTaFZnl [root@localhost ~]# mysql -uroot –pqKTaFZnl mysql> SET PASSWORD = PASSWORD('123456'); #Set the password to 123456 mysql> exit [root@localhost ~]# mysql -uroot -p123456 e. Remote login user settings mysql> use mysql; mysql> select host,user,password from user; +----------------------+------+------------------------------------------+ | host | user | password | +----------------------+------+------------------------------------------+ | localhost | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | localhost.localdomain | root | *1237E2CE819C427B0D8174456DD83C47480D37E8 | | 127.0.0.1 | root | *1237E2CE819C427B0D8174456DD83C47480D37E8 | | ::1 | root | *1237E2CE819C427B0D8174456DD83C47480D37E8 | +----------------------+------+------------------------------------------+ mysql> update user set password=password('123456') where user='root'; mysql> update user set host='%' where user='root' and host='localhost'; mysql> flush privileges; mysql> exit f. Set the system to start automatically [root@localhost ~]# chkconfig mysql on [root@localhost ~]# chkconfig --list | grep mysql mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off g. MySQL default installation location /var/lib/mysql/ #Database directory /usr/share/mysql #Configuration file directory /usr/bin #Related command directory /etc/init.d/mysql #Startup script h. Modify the character set and data storage path Configure the /etc/my.cnf file, modify the data storage path, mysql.sock path and the default encoding utf-8. [client] password = 123456 port = 3306 default-character-set=utf8 [mysqld] port = 3306 character_set_server=utf8 character_set_client=utf8 collation-server=utf8_general_ci #(Note that after installing MySQL in Linux, the default is: table names are case-sensitive, column names are not case-sensitive; 0: case-sensitive, 1: case-insensitive) lower_case_table_names=1 #(Set the maximum number of connections, the default is 151, the maximum number of connections allowed by the MySQL server is 16384; ) max_connections=1000 [mysql] default-character-set = utf8 Viewable character set show variables like '%collation%'; show variables like '%char%'; I. If you want to log in to MySQL remotely, you need to: authorize and turn off the firewall. 1. Authorization; enter mysql on the server and enter the following command Copy the code as follows: [GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'here is your password' WITH GRANT OPTION;] OR Copy the code as follows: [GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '' WITH GRANT OPTION;] The difference lies in whether a password is required for access. This sentence is used to set all user names to be able to remotely access all tables in MySQL. If you don't want to release all, you can set it according to this rule. Grant permission 1, permission 2, ... permission n on database name. table name to user name @ user address identified by 'password'. 2. Turn off the firewall service iptables stop Shutdown command chkconfig iptables off Permanently shut down the firewall Run the two commands at the same time. After the execution is complete, check the firewall shutdown status. service iptables status At this point, MySQL has been installed and configured successfully. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed explanation of custom configuration of docker official mysql image
>>: JavaScript to filter arrays
Table of contents Preface 1. ss command 2. Overal...
Table of contents Math Objects Common properties ...
Serious MySQL optimization! If the amount of MySQ...
Preface We need to retrieve certain data that mee...
Cause: NVIDIA graphics card driver is damaged Sol...
This article uses an example to describe how to s...
First, let's talk about why we use provide/in...
Table of contents Preface Solution: Step 1 Step 2...
1. Rendering JD Effect Simulation Effect 2. Princ...
1. Enable Prometheus telemetry data By default, t...
The logs in MySQL include: error log, binary log,...
First we create the database table: CREATE TABLE ...
Mac comes with Apache environment Open Terminal a...
Notice! ! ! This situation can actually be avoide...
1. Grid layout (grid): It divides the web page in...