View
rpm-qa| -qa | Grep-i MySQL
If any, uninstall
Rpm-e mysql-libs--nodeps or yum remove mysql* command to uninstall MySQL and related components
Upload
Mysql-client-5.6.35-1. El6.x86_64.rpmMySQL-devel-5.6.35-1. El6.x86_64.rpmMySQL- server-5.6.35-1.el6.x86_64.rpm
Installation
# RPM-IVH mysql-server-5.6.35-1-ivh mysql-devel-5.6.35-1-ivh mysql-client-5.6.35-1/usr/ share/mysql/my-default. cnf/etc/my.cnf
If there is a packet conflict
#yum-y-Remove mysql-libs-5.1*
Initializing MySQL and setting passwords
#/usr/bin//root/mysql_secret for the root user at Wed Dec one 23:32:50- uroot–pqktafznlmysql> SET PASSWORD = PASSWORD (' 123456 '); #设置密码为123456mysql>-uroot-p123456
Allow remote Login
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
Set up boot from
--list | grep mysqlmysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Default installation location for MySQL
/var/lib/mysql/ #数据库目录/usr/share/mysql #配置文件目录/usr/bin #相关命令目录 /etc/init.d/mysql #启动脚本
modifying character set and data store paths
Configure The/etc/my.cnf file, modify the data storage path, themysql.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 0: Case-sensitive, 1: Case insensitive) lower_case_table_names=1 151, maximum number of connections allowed by MySQL server 16384;) Max_connections=1000 [MySQL] default-character-set = UTF8
View character Sets
Show variables like '%collation%'%char% ';
Start service /etc/init.d//etc/init.d/mysql stop
Linux installation MySQL